Published on February 5, 2016 by LearnCode.academy

A big question in React JS is State vs Props. State is essentially any data that relates to the internals of a React component, but has nothing to do with the outside world. Props are data that the React.js component depends on to function and render correctly.

GET THE SOURCE CODE:
github.com/learncodeacademy/react-js-tutorials

React JS #1: Intro & Workspace Setup
youtu.be/MhkGQAoc7bc (Coming Tues, Feb 2@11CST)

React JS #2: Anatomy of a Component
youtu.be/fd2Cayhez58 (Coming Wed, Feb 3@11CST)

React JS #3: Composing Multiple Components
youtu.be/vu_rIMPROoQ (Coming Thurs, Feb 4@11CST)

React JS #4: State, Props & Data
youtu.be/qh3dYM6Keuw (Coming Fri, Feb 5@11CST)

React JS #5: Events & Data Changes
youtu.be/_D1JGNidMr4 (Coming Mon, Feb 8@11CST)

React JS #6: React Router & Intro to Single Page Apps
youtu.be/1iAG6h9ff5s (Coming Tues, Feb 9@11CST)

React JS #7: React Router Params & Queries

Leave a Reply

228 Comments on "REACT JS TUTORIAL #4 – State vs Props & Application Data"

Notify of
avatar

Phlickey
Guest
Phlickey
1 year 8 months ago

Can anyone explain why the keyword `this` is able to reference the scope of the outer code block, rather than the scope of the anonymous function that's being passed to setTimeout? Is this a feature of ES6 arrow notation, or is the transpiller inferring the intended scope?

Phlickey
Guest
Phlickey
1 year 8 months ago

Never mind. In case anyone cares, ES6 arrow functions retain their scope from where they're referenced in the flow of the code, not the scope they have at run time. Perfect for setTimeout.

Tyler Z
Guest
Tyler Z
1 year 9 months ago

I love all the videos I've watched so far! This is kind of a random comment and isn't meant to be offensive at all, but your voice constantly reminds me of Bobby from King of the Hill

Tyler Z
Guest
Tyler Z
1 year 9 months ago

I love all the videos I've watched so far! This is kind of a random comment and isn't meant to be offensive at all, but your voice constantly reminds me of Bobby from King of the Hill

The Gabornator
Guest
The Gabornator
1 year 9 months ago

Could anybody explain when to use this.props.title and when props.title? I don't seem to understand the difference. Thank you!

The Gabornator
Guest
The Gabornator
1 year 9 months ago

Could anybody explain when to use this.props.title and when props.title? I don't seem to understand the difference. Thank you!

Benjamin Möckl
Guest
Benjamin Möckl
1 year 9 months ago

Oh no, Bob changed :/ xD

Benjamin Möckl
Guest
Benjamin Möckl
1 year 9 months ago

Oh no, Bob changed :/ xD

James Moran
Guest
James Moran
1 year 9 months ago

Why not use a normal variable over this.state? Does using a normal variable re-render the component and only update the parts of the DOM that changed?

James Moran
Guest
James Moran
1 year 9 months ago

Why not use a normal variable over this.state? Does using a normal variable re-render the component and only update the parts of the DOM that changed?

Kirill Muhov
Guest
Kirill Muhov
1 year 9 months ago

awesome! thx

1 7 8 9 10 11 16
wpDiscuz