ecology icon indicating copy to clipboard operation
ecology copied to clipboard

Render Playground on ComponentDidUpdate

Open NogsMPLS opened this issue 8 years ago • 2 comments

Component playground only renders on initial render. In some situations, if Ecology is updated with props, it would not update the playground, because it was already instantiated. Adding render in componentDidUpdate fixes this.

Could also possibly explore non-ref solutions.

NogsMPLS avatar Mar 14 '16 19:03 NogsMPLS

Awesome, lemme give this a spin and then I'll get it merged

kenwheeler avatar Mar 14 '16 21:03 kenwheeler

Any update on this PR ? It would be greatly appreciated ! If anyone is interested about this problem, we built an app based on Ecology where we needed to update Ecology's props and we had to force unmount / remount Ecology by passing it a "key" prop to re-render the playgrounds. This is probably not the best in terms of performance, but it works well.

aurelienshz avatar Sep 12 '16 13:09 aurelienshz