ecology
ecology copied to clipboard
Render Playground on ComponentDidUpdate
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.
Awesome, lemme give this a spin and then I'll get it merged
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.