For the impatient, the source code is here.
Let’s being by laying our sidebar component. The structure is pretty straight forward:
Believe it or not but designers call the three horizontal bars as a hamburger button.
In this article, we are going to show you how to create a toggle switch in react using css.
Let’s begin by creating a Toggle component in react:
For the css style we will hide the checkbox. We still keep it in the DOM since we…
In this article, we will show you how to create global state using createGlobalState
, a function we built. If you are interested in how this function is implemented in more detail go to this article.
In some cases, two components that are not located close to each other in your react component tree need to share and modify data. For example Layout
and UserPosts
:
This component tree is simple enough to pass components down via props, but what if the components are not directly connected in a straight line? Like the SidePanel
and UserPosts
:
In this article, we will show you how to build a reusable function that lets you create a global state. If you are only interested in how to use it and not the implementation details, jump over to this article.
In some cases, two components that are not located close to each other in your react component tree need to share and modify data. For example Layout
and UserPosts
:
This component tree is simple enough to pass components down via props, but what if the components are not directly connected in a straight line? Like the SidePanel
and UserPosts
: