Use reducer is part of the additional HOOKS api. It should be used when components have complex state logic that involves nested values or when the next state depends on the previous one.
In a typical React application, data is passed top-down (parent to child) via props, but this can be cumbersome for certain types of props (e.g. locale preference, UI theme) that are required by many components within an application. Context provides a way to share values like these between components without having to explicitly pass a prop through every level of the tree..
Gatsby.js is a static PWA (Progressive Web App) generator. You get code and data splitting out-of-the-box. Let's see how to start with it!
This is the second video of the series about Gatsby.
This is where things are getting more insteresting. Let's see how to render information about our filesystem using graphql!
Let's render the markdown files in React using the gatsby-transformer-remark
Let's inject some custom props (the url slug) in our schema
Now that we have slugs for each markdown file, it's time to create the templates to load them.
Let's inject markdown data into our template!
Building your own Hooks lets you extract component logic into reusable functions. The idea of this video, is to show how powerful custom hooks are, creating an usePagination hook.
After react's conf we're all pretty excited with the hooks API. Today we're going to see how to use the most basic ones, useState & useEffect.
Render prop is a common pattern for sharing logic. Last time we saw how to do it using named props. Today we'll see how to use the children as a render prop.
Render prop refers to a technique for sharing code between React components using a prop whose value is a function.
Following the HOC pattern, let's create a connect function to refactor two components which share the same logic for getting data from a DataSource.
Higher-order component is a technique in React for reusing component logic. HOCs are not part of the React API, per se. They are a pattern that emerges from React’s compositional nature.
We're going to talk about the React composition model and why it is recommended to use composition instead of inheritance to reuse code.