-
In react I am managing open closed drawer state with redux: function MenuButton() {
const dispatch = useAppDispatch();
return <Burger onClick={() => dispatch(layoutActions.toggleDrawer())} />;
} how do you do it in remix globally (without passing useState around)? Do you use search param |
Beta Was this translation helpful? Give feedback.
Answered by
sergiodxa
Apr 26, 2024
Replies: 1 comment
-
You could use useState and a context for that, although you can probably put that drawer in a parent route and keep the state, toggle button and drawer element all in one place. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
tombohub
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You could use useState and a context for that, although you can probably put that drawer in a parent route and keep the state, toggle button and drawer element all in one place.