Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

fix(Provider): correctly handle change of renderer #702

Merged
merged 5 commits into from
Jan 11, 2019

Conversation

layershifter
Copy link
Member

Fixes #581.

After

rtl-fix


react-fela is not handling the renderer prop change on component, robinweser/fela#388, #581 (comment).

render() vs key change on RendererProvider

When we changing a key prop value, we will remount the whole tree. render() is a pretty safe and fast function, it will create a DOM subscription only once, fela-dom/src/dom/render.js.

The render() function cannot be called in componentDidMount() as a side effect because fela creates CSS classes directly in component's render cycle.

@layershifter layershifter merged commit 46e9804 into master Jan 11, 2019
@layershifter layershifter deleted the fix/provide-dymanic-render branch January 11, 2019 15:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🧰 fix Introduces fix for broken behavior. ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RTL works incorrectly when rtl theme prop is changed dynamically (with no remount of Provider)
2 participants