mg901/styled-breakpoints

rules-of-hooks warning after update to v11.0.2

Closed this issue · 3 comments

SyFlo commented

Hi @mg901,

first of all, I really like the changes introduced in v11 today. Working with the down-function feels a lot more natural now. However, I noticed that after the update to v11.0.2, the useBreakpoint hook now triggers a rules-of-hooks warning.

Example: useBreakpoint(up('md'))
Output: Warning: Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks

mg901 commented

@SyFlo done!)

SyFlo commented

awesome 😃 I'll check it out

SyFlo commented

works like a charm now. thank you!