Skip to content

Updated the jsfiddles that have renderComponent() instaed of render() #2491

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/docs/thinking-in-react.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Now that we've identified the components in our mock, let's arrange them into a

## Step 2: Build a static version in React

<iframe width="100%" height="300" src="http://jsfiddle.net/n25pd/embedded/" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
<iframe width="100%" height="300" src="http://jsfiddle.net/n25pd/185/embedded/" allowfullscreen="allowfullscreen" frameborder="0"></iframe>

Now that you have your component hierarchy it's time to start implementing your app. The easiest way is to build a version that takes your data model and renders the UI but has no interactivity. It's easiest to decouple these processes because building a static version requires a lot of typing and no thinking, and adding interactivity requires a lot of thinking and not a lot of typing. We'll see why.

Expand Down Expand Up @@ -104,7 +104,7 @@ So finally, our state is:

## Step 4: Identify where your state should live

<iframe width="100%" height="300" src="http://jsfiddle.net/t53sx/embedded/" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
<iframe width="100%" height="300" src="http://jsfiddle.net/t53sx/26/embedded/" allowfullscreen="allowfullscreen" frameborder="0"></iframe>

OK, so we've identified what the minimal set of app state is. Next we need to identify which component mutates, or *owns*, this state.

Expand All @@ -129,7 +129,7 @@ You can start seeing how your application will behave: set `filterText` to `"bal

## Step 5: Add inverse data flow

<iframe width="100%" height="300" src="http://jsfiddle.net/F8H7p/embedded/" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
<iframe width="100%" height="300" src="http://jsfiddle.net/F8H7p/136/embedded/" allowfullscreen="allowfullscreen" frameborder="0"></iframe>

So far we've built an app that renders correctly as a function of props and state flowing down the hierarchy. Now it's time to support data flowing the other way: the form components deep in the hierarchy need to update the state in `FilterableProductTable`.

Expand Down