question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Resize not being detected when rendering component is changed (HOC).

See original GitHub issue

When 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:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
maslianokcommented, Sep 3, 2020

lol 😃 done

0reactions
zarv1kcommented, Sep 3, 2020

@maslianok it happens 😃 Thank you!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found