Home » react » Page 3

Yesterday, we said that the easiest way to make components talk to each other is to hoist their state up one level or multiple levels, and then pass props down; and callbacks go back up to change the shared state, which then gets propagated to everybody who cares about that state. Now let me show […]

Read More

Yesterday, we made a button. Out, it turns white, and when you click it. That when you hover over it, there’s red. And I mentioned that in an architecture with multiple components that have to talk to each other, you make it so that props go down and callbacks come back up. In your react, […]

Read More

Yesterday we used the on-click event handler to manipulate state of our component and show off state full or the clarity rendering. Which is great, but I think we kind of jumped the gun with the on-click. Let’s take a step back. Talk about just how react events work. React comes with a full event […]

Read More

So far we talked about React’s most obvious innovation, which is JSX. Yesterday we mentioned state versus props, which leads us to React’s biggest innovation, which is stateful rendering. Stateful rendering is that thing in React that makes your life really easy and helps you the most with … Well, it basically takes away the […]

Read More

So we talked about state and props, but what’s the difference anyway? Well, one difference is that both functional components and class based components have props, whereas only class based components have state. Also, state is an internal component whereas props come from the outside. Maybe I should draw a picture. Let’s say we have […]

Read More

Functional React components are great. They get the job done. But there’s a type of component that’s even better: A class-based component. Class-based React components are a lot like functional components. You give them props and they render JSX. But they also have state, lifecycle hooks, and all the bells and whistles that come with […]

Read More

We’ve said you can assign a chunk of JSX to a variable and you know what, that’s almost a component! To turn any chunk of JSX into a component you need to make two tweaks: you need to return your JSX from a function your function name has to start with a capital For example, […]

Read More

My favorite way React makes components easier to build is JSX –  a JavaScript extension language that feels like you’re putting HTML straight in your JavaScript. JSX makes HTML a first-class citizen of your JavaScript code. That means you can reach right in there and get your hands dirty. You’re working directly with the stuff […]

Read More

Components are what makes React, and the other modern frameworks, so great. Easy-to-use componentization is the game changer you’re here for. But why? You can think of components as LEGO blocks for your app. Take this glider for example 🛩 It’s built out of a bunch of little LEGO pieces that you can put together […]

Read More

A friend of mine recently said that React is the most profitable piece of technology she’s ever learned. Guillermo Rauch famously tweeted React is such a great idea, we’re gonna spend the next decade figuring out alll the implications. Easy-to-use components have revolutionized how thousands of software engineers think about their code. Personally, I like […]

Read More