Attention: The following article was published over 5 years ago, and the information provided may be aged or outdated. Please keep that in mind as you read the post.The React framework’s component-based approach makes managing large projects simpler. By making it easier to break functionality down into logical pieces that are encapsulated, the framework makes it easier for developers to …
About the Author
A Look Into React Hooks
There are two ways to create React components, using functions or classes. A common question when learning React is often “When do I use which?” Luckily, this is a question that might eventually become obsolete with the release of React version 16.8 as it includes hooks.
Hooks provide a way to use functionality such as state and context that could only be achieved through classes previously to be easily done with functional components.
In this blog, we’ll introduce React hooks and show some code examples of those hooks in action. Specifically, we will take a simple class component and convert it to a function with hooks, have an in-depth look at hooks useState and useEffect, and create a custom hook. Let’s get started!
State Management with MobX and React
There are many options when it comes to managing the state of a React application. Choosing the right one for your application can feel daunting.
The most popular choice, Redux, is often thought of as verbose because it requires a lot of boilerplate code, thus slowing down development. Redux is also very opinionated so it will take time for those unfamiliar with its functional programming paradigm to become comfortable with it.
In this blog, we’ll take a closer look at an alternative that aims to solve issues in React application state: MobX. To do that, I built a simple calorie counter application that will be used to showcase MobX in use.
An Introduction To Underscore.js
Underscore is a JavaScript utility library with many useful functions to handle common programming use cases. In this blog, I discuss some of the more useful functions I have found inside of Underscore. Some of the benefits are less apparent in smaller and simpler code chunks. But, as the complexity of the code increases, this is where Underscore really shines as the useful toolbox that it is…