Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add safer refresh on InteractiveExample (#6057)
Before when page was loading, there was a chance that `width` value wouldn't be passed to component in `InteractiveComponent` - in other words the `width` will be passed to component before it had become something other than `null`, and there won't be a rerender after width gets a number value. After this change, with `useEffect` hook, we monitor if width has changed and if so, we trigger a rerender that guarantees our component will always get correct width.
- Loading branch information