A tagged function allows to change the output of template literals. It will receive two parameters an array with the plains strings and other array with the values. Going trough the array of strings we can concatenate each string with its styled value. In this case we use a bold red style. Returning the result we see an undefined. To avoid it we use the or flag on the value, and now the highlight tag function works!
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. Let's see how to create a re-usable Layout component for our Gatsby blog!
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.
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. Can we finally get rid of classes ? What do you think ?
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. Let's code a Toggle component to see how this works!
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.