Resize not being detected when rendering component is changed (HOC).
See original GitHub issueWhen rendering multiple components it just detects resizing in the first one. If, for some reason, you start rendering another one, it just not detects the resizing in the second one. This happens using HOC. Example.
render(){ if(!this.state.show){ return <button onClick={this.handleShow}>Show</button> } return <h1>Hey there</h1>; }
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Rerender view on browser resize with React - Stack Overflow
The problem is that when the context changes, all the components that use it should be re-rendered and it is not easy to...
Read more >Re-render a React Component on Window Resize | Pluralsight
Inside handleResize , we no longer simply console.log , but instead set new state when the resize is detected, using setDimensions . If...
Read more >Send a resize event to all grid items on window resize. #702
I was hoping to see an onLayoutChange event get fired on window resize. Please mark the type of this issue: Bug Feature Request...
Read more >react-resize-detector - npm
This library uses the native ResizeObserver API. DOM nodes get attached to ResizeObserver.observe every time the component mounts and every time ...
Read more >Smarter Component Rendering with ResizeObserver | Wijmo
Until recently, there was no way to detect those situations efficiently using JavaScript. Handling Resizing (Partial Solution). We dealt with ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
lol 😃 done
@maslianok it happens 😃 Thank you!