Quote of the Day
"Take time to learn the closest thing that we have to a superpower - Code." - Sharen Eddings
This post covers how you can use the Context API in React. Which is an awesome way to manage your state and get rid of prop drill. With the Context API, you have one or more files where you can store your state, functions, and some other logic that you want, and then simply use them in any of your components you want without any more hard work! Let's Go!!!
Writing test cases is an important part of React development. Each component should have a test case written correctly so by just running a single command we can make sure that our entire application works correctly no matter how big the application is. So if some API call is failing because the server is down or there is some issue processing request we can easily catch it before the application is deployed to production by just running a single command. Therefore writing unit tests in React is very important and every React developer should know how to write the test cases.
By Phillip Shim