Welcome to the first ever Dev Beans JavaScript newsletter. Today we have a couple React articles: the first on how to use the React Context API, and another on how to set up testing in React using Jest. Finally, we have a fun article challenging you to implement your own versions of the JavaScript array methods. A great way to test your skills!
Quote of the Day
"Take time to learn the closest thing that we have to a superpower - Code." - Sharen Eddings
Todays Articles
Context API in React! | Switch to it NOW!
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!!!
A complete guide for testing in React using Jest along with code coverage report
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.
Let's write native JavaScript Array methods from scratch!
By Phillip Shim
Native JavaScript methods exist to nourish and enrich our developer experience. What if they simply vanished? After all, it's 2020. Anything can happen right? ๐. Well, that's the case here in this article ๐จ. But we are software developers and are confident that we can overcome any problems that we encounter ๐ช! So here is the challenge! Can you write the JavaScript Array methods listed below from scratch?