Nate GageWriting Meaningful FunctionsOne trick to improve the efficiency of file structure and manipulability of code is to break functions into smaller ones. This is not just…Jul 4, 2022Jul 4, 2022
Nate GageReact State Not Updating Immediately?I’m setting state in my app and referencing it. Why don’t I see the new values?Apr 16, 2021Apr 16, 2021
Nate GageA Nuance with Cookies in Next.jsThe other day I was working on authenticating some pages in Next.js using cookies that stored a token. When a user logins in, a JSON Web…Sep 26, 2020Sep 26, 2020
Nate GageMocking Axios with Mock Service WorkerTesting is just not that fun! However, I recently discovered Mock Service Worker, a simple and efficient way of mocking axios or fetch in…Sep 9, 20203Sep 9, 20203
Nate GageConfiguring Jest With Next.jsNext.js is a popular React framework for server-rendered applications. Jest is a popular framework for writing unit tests. So I was quite…Sep 1, 20201Sep 1, 20201
Nate GageSimplifying Redux with useDispatch and useSelectorRedux is a popular library for managing the global state in your application. However, it can get a bit weedy when it comes to…Aug 24, 2020Aug 24, 2020
Nate GageAuthentication with Next.js and JSON Web TokenConcepts covered: Next.js, Node.js, JWT, Cookies, React HOCAug 20, 20201Aug 20, 20201
Nate GageDisabling a Button with React’s useState HookUsing React’s useState hook is an effective way to toggle between states in your functional components. According to the React…Aug 17, 20201Aug 17, 20201