Skip to content

Commit 88c8898

Browse files
committed
Add information about Parcel and fix typos
1 parent 1031b16 commit 88c8898

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

10-suspense-for-data-fetching/README.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ npm ci
1010
npm start
1111
```
1212

13-
Development server should open on the port 1234 _(unfortunately hot reload doesn't work with parcel and react experimental)_.
13+
We are using Parcel (https://parceljs.org/) for development server instead of webpack. It starts on port 1234. _(unfortunately hot reload sometimes doesn't work with parcel and react experimental, therefore is disabled)_.
1414

1515
## Introduction
1616

1717
- React Suspense for Data Fetching is pretty experimental, so there are some rough edges that you're going to be working through.
1818
- The APIs can change in the future.
19-
- Only Facebook it is using in production with Relay.
19+
- Only Facebook is using it in production with Relay.
2020
- One of the things that I love about React in general, is that they're always applying the things that they're presenting to us internally at Facebook first, so they get some of the quirks worked out.
2121
- We're playing around with things, we're making little abstractions from things. Some of these things might be a bad idea, some of them might be good ideas. This is the whole point of this workshop, is to experiment with this, get familiar with the ideas and the concepts and the things that it enables, and then let you run off and play around with it, and give feedback back to the React team.
2222

@@ -44,6 +44,11 @@ Start fetching all the required data for the next screen as early as possible, a
4444

4545
## Setup
4646

47+
Install experimental React
48+
```
49+
npm install react@experimental
50+
```
51+
4752
Use concurrent mode to enable experimental features.
4853

4954
```
@@ -84,7 +89,7 @@ Here’s what happens when we render `<Page>` on the screen:
8489

8590
- React tries to render `<Page>`. It returns `<People>` as children.
8691

87-
- React tries to render `<People>`. It calls `peopleResource.read()`. None of the data is fetched yet, so this component “suspends”. React skips over it, and tries rendering other components in the tree.
92+
- React tries to render `<People>`. It calls `peopleResource.read()`. That will throw a Promise, no further code in `<People>` is executed. None of the data is fetched yet, so this component “suspends”. React skips over it, and tries rendering other components in the tree.
8893

8994
- There’s nothing left to try rendering. Because `<People>` suspended, React shows the closest `<Suspense>` fallback above it in the tree: "Loading people...". We’re done for now.
9095

0 commit comments

Comments
 (0)