javascript - React.js Updating UI after removing a row form a list -


i'm new react, i'm have react component generates list. list has delete button generated it, bound event handler. when button clicked pass in id of row removed , removed it. part i'm struggling how update list once row has been removed it?

whats best practice react way of doing ? have created fiddle, sadly it's not rendering list.

thanks help

var clickhandler = function(ev){     var idx = ev.dispatchmarker.split('$')[1];     data.splice( idx, 1 ); ///remove row     //how update ui? }; 

like said in comments, use state instead of props.

but direct answer question use: this.forceupdate();


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -