Skip to content
This repository was archived by the owner on Feb 17, 2022. It is now read-only.

Render Playground on ComponentDidUpdate - #27

Open
NogsMPLS wants to merge 1 commit into
FormidableLabs:masterfrom
NogsMPLS:patch-1
Open

NogsMPLS wants to merge 1 commit into
FormidableLabs:masterfrom
NogsMPLS:patch-1

Conversation

@NogsMPLS

Copy link
Copy Markdown
Contributor

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.

@kenwheeler

Copy link
Copy Markdown
Contributor

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

@aurelienshz

Copy link
Copy Markdown

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants