Innhold om React
Totalt 137 innlegg
Side 9 av 10
Class property initializers
Although not React specific, this technique has made our React code much simpler and easier to read. Say hello to class property initializers!
Although not React specific, this technique has made our React code much simpler and easier to read. Say hello to class property initializers!
Functional vs class components
In React, there are two types of components - functional and class-based. What's the difference and when should you use each one?
In React, there are two types of components - functional and class-based. What's the difference and when should you use each one?
Documenting your components
If you're writing components that are shared between different teams, or even different developers, documenting your components is a must. And it's crazy simple!
If you're writing components that are shared between different teams, or even different developers, documenting your components is a must. And it's crazy simple!
Check out type checking!
JavaScript is a dynamically typed language. That means you don't have types to help you secure your apps from stupid bugs. Here's a few ways to avoid just that in your React apps!
JavaScript is a dynamically typed language. That means you don't have types to help you secure your apps from stupid bugs. Here's a few ways to avoid just that in your React apps!
An intro to routing in React
Routing is usually one of the hardest parts of any web application. In React, however, they're not really anything different than regular components!
Routing is usually one of the hardest parts of any web application. In React, however, they're not really anything different than regular components!
Split your app into pieces!
With the rise of single page applications, we also got megabyte-sized bundles of JavaScript code to download and compile before we could show anything to the user. THIS ENDS NOW!
With the rise of single page applications, we also got megabyte-sized bundles of JavaScript code to download and compile before we could show anything to the user. THIS ENDS NOW!
Component libraries
If you're in a rush to get something production ready, you might not have the time or resources to create your own component library. Luckily, there are several pre-made ones to choose from!
If you're in a rush to get something production ready, you might not have the time or resources to create your own component library. Luckily, there are several pre-made ones to choose from!
What is this JSX business?
One of the weirdest things to me when I started learning React was this JSX syntax. What is it? Where does it come from? And how can I make really cool stuff with this?
One of the weirdest things to me when I started learning React was this JSX syntax. What is it? Where does it come from? And how can I make really cool stuff with this?
Introducing CSS-in-JS
React did something pretty radical when introducing JSX - suddenly we were blending our logic and structure in the same file. Now, the time has come to include CSS as well!
React did something pretty radical when introducing JSX - suddenly we were blending our logic and structure in the same file. Now, the time has come to include CSS as well!
Add error boundaries to your app!
React 16 brought us a way to handle errors in a neat, declarative way
React 16 brought us a way to handle errors in a neat, declarative way
Share logic between components!
Sharing code between components can be made much more declarative and reusable than utility functions
Sharing code between components can be made much more declarative and reusable than utility functions
Fragments, finally!
Fragments lets you return several root nodes from your components. Finally we can skip those pesky container divs!
Fragments lets you return several root nodes from your components. Finally we can skip those pesky container divs!
Write quality code
Writing great, readable, accessible and well-formatted code used to take years to learn. Now there are tools to help you get there faster!
Writing great, readable, accessible and well-formatted code used to take years to learn. Now there are tools to help you get there faster!
The mysteries of setState
Although we hear a lot about MobX, Redux and other tools for handling state, React ships with its very own.
Although we hear a lot about MobX, Redux and other tools for handling state, React ships with its very own.
Structuring your application
Structuring your React app is incredibly important for making your project maintainable and easy to navigate. What is the best way to do it?
Structuring your React app is incredibly important for making your project maintainable and easy to navigate. What is the best way to do it?