Tracking the Previous Page using React Context
There are times that the previous path is needed in a React App. This is not available in the NextJS router or in React Router but it can be easily tracked and stored in a React Context.
There are times that the previous path is needed in a React App. This is not available in the NextJS router or in React Router but it can be easily tracked and stored in a React Context.
Some quick notes for adding dark mode to a React app - allowing users to set their preferred mode and honoring their system preference by default.
When performing a global search or showing an activity feed, multiple models may need to be queried. These are some notes around ideas for achieving this.
When working with CSS modules, there are times global classes need to be styled. The :global
operator does just that.
Dark mode is available and used pretty much everywhere now. Most operating systems allow users to set their preference between light and dark mode and this can be detected in the browser.
When running an internal GitLab server, it can also be beneficial to have some repositories mirrored to GitHub. GitLab makes this fairly easy, as it can be setup to mirror changes on each push.
When starting a new project there are times I'd like to overwrite the first commit (for example, removing the commit made by a bootstrap script such as create-react-app
).