Copy
Stay up to date with the latest news on React.
View this email in your browser

The React Newsletter

Hi <<First Name>>,
 
Discovering patterns with React hooks
One of the things I enjoy the most about coding is discovering patterns. Being aware and mindful of the patterns emerging in your codebase can make it easier to keep that codebase consistent, readable and easy to navigate. Most patterns will remain unspoken, and some, that prove notably elegant, are named and promoted as best practices. Others might even be candidates for a basis of a new abstraction, although I recommend restraint as it’s worth remembering that abstractions are expensive.

Read more
 
Performing Async Actions using Hooks

Recently, I have written about fetching data using Hooks and Render Props. The purpose of that article was to fetch and display data. In this post, I would like to revisit that article and extend it with examples to show how to use the same concept to perform other types of actions (e.g POSTing data).

How do we abstract away data actions?

Whether you are fetching, updating, adding, deleting, or performing custom actions, all these operations have one thing in common. They all go through three stages— loading, success/data, and error. These three stages are building blocks of UI development. Any operation we do (it doesn’t even need to be an API action), it will have these three states.

Now, let’s think about the interface. Our interface accepts an asynchronous action (in our case, it is a function) and return three states with a way to perform the action.

I want to mention, just using a hook or a component is not enough. The actions must respect the provided interface; so that, our logic can work normally. This is one of the important things to remember when abstracting any kind of logic. We should set up interface/contract that all parts of the abstracted idea agree upon.


Read more
 
Requisite React - Kent C. Dodds
React is a brilliant JavaScript library for building simple and complex user interfaces. In our eagerness to apply React to our most complex of problems and ship solutions today, we can get lost in the 🌲🌲🌲 forest of abstractions 🌲🌲🌲. When it comes to leveling up our skills in anything, I find the most effective method is to take a step back and understand the foundational fundamentals. To strip away all abstraction until what we're left with is the bare bones. The better you understand an abstraction, the more effective you will be at using it. In this talk, we'll get more effective at using React Hooks, React Suspense, and JSX.

Watch video
 
3 tips to create a responsive app with Material Design
Today the need for apps that gracefully scale from desktop to mobile and everything in between is greater than ever and, at least in my opinion, this is due to the growing interest of developers towards progressive web apps and porting Android apps to Chrome OS.

Read more
 
Testing React Firebase Apps With Cypress
Cypress is a great tool for testing the UI of applications, but it was built assuming that your app follows the standard model of data being loaded from a REST API. This assumption means that there isn’t much in the way of examples for systems where database interactions happen socketed clients in systems like Firebase RTDB and Firestore.

Read more
 
A different way to manage state in React

Imagine a React app that shows a list of tasks.

In this app, there is a component called <TaskList> that renders a bunch of <Task> components, and a button to add a new task.


Read more
 
React video courses
Because I need to pay my bills 😉
 
Copyright © 2019 ABL - The Problem Solver, All rights reserved.


unsubscribe from this list    update subscription preferences 

Email Marketing Powered by Mailchimp