You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This assumes that screenClass is calculated based on the element width, but that only works after an update (for example screen resize), because setting a ref does not rerender the component.
The result is that on first render the screenClass is off.
The docs give this example:
This assumes that
screenClass
is calculated based on the element width, but that only works after an update (for example screen resize), because setting a ref does not rerender the component.The result is that on first render the screenClass is off.
Instead use this approach:
The text was updated successfully, but these errors were encountered: