react-component-queries
react-component-queries copied to clipboard
Once/When option?
I'm sure this isn't how you'd like to ideally handle this, but I'm using this project within react-storybook and noticed that when I resize the window, the component constantly resizes.
I don't know if this is due to margins/padding calculation or what.
Basically, the usage I'm going for is waiting for width/height calculation for the initial render of the component, then not worrying about the resize event at all anymore. (i.e. the size is only necessary for initial rendering of the layout)
An interesting suggestion! I am holiday'ing with the fam at the moment, but will give this some thought after the 26th.