What’s the difference between me and you?

A common question that most developers have when learning React is what really is the difference between state and props? Understanding the differences between them are important as well as a big step forward in understanding one of JavaScript’s most popular and extensively used libraries. Let’s first take a look at a simple definition for each before diving into them deeper.

State: describes a default data value in a React component that can change over time, this is usually based off a user’s actions that call for changes in the user’s interface.

Props: short for property or properties, are used…


A Build-A-Long using React Router to navigate through component views

As many of you are aware, React apps are comprised of a number of different components. Some of these components can remain static throughout the user’s experience such as a header or navigation bar. I consider these components to be static due to the fact they will not change in location, size, or its contents over time. On the other hand, there are also components that are dynamic or fluid that can change overtime such as a user’s home feed and an applications blog or news page.

You are probably wondering, what does this have to do with navigating around…


Taking a deeper look at React’s core components

When using components to render your pages or views in React, you will either use a class component or a function component. The question is, which one should you be using and why? This may seem like somewhat of a trick question as you are more than likely going to be dealing with both in your future.

Let’s first take a look at a class component and a functional component that both return what kind of component they are.

Class Component:


Prerequisites:

React installed

Rails installed

Welcome back everyone, this is the second part of the React and Rails authentication build. As you remember from part 1, we built out a simple sign-up form that then lands the new user on a welcome page. Now we will move on to authenticating our users by creating a sign-in form that let’s them login. If you did not follow along in the first part but wish to from here on out, you can find a copy of the repo we will be starting from today here.

The only change that has been made…


Prerequisites:

React installed

Rails installed

Welcome back everyone, this is the third and final part of the React and Rails authentication build. As you remember from part II, we added to our sign-up feature by also creating a sign-in feature as well that authenticates our users. If you have not followed along during the first or second part, you can find a copy of the repo we will be starting from today here.

If you have just copied the repo down, you will need to run:

On the backend:

Kevin Glasgow

Full Stack Web Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store