Skip to content

Commit 6ad07fe

Browse files
committed
Part 3 sandbox and images
1 parent c2f0389 commit 6ad07fe

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

docs/tutorials/essentials/part-3-data-flow.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,21 @@ To get started, you can open and fork this CodeSandbox:
4545

4646
<iframe
4747
class="codesandbox"
48-
src="https://codesandbox.io/embed/github/reduxjs/redux-essentials-example-app/tree/master/?codemirror=1&fontsize=14&hidenavigation=1&theme=dark&runonclick=1"
48+
src="https://codesandbox.io/embed/github/reduxjs/redux-essentials-example-app/tree/433b1132560f07c5911432182b6a4047610c25e9/?&fontsize=14&hidenavigation=1&theme=dark&runonclick=1"
4949
title="redux-essentials-example-app"
5050
allow="geolocation; microphone; camera; midi; vr; accelerometer; gyroscope; payment; ambient-light-sensor; encrypted-media; usb"
5151
sandbox="allow-modals allow-forms allow-popups allow-scripts allow-same-origin"
5252
></iframe>
5353
54-
You can also [clone the same project from this Github repo](https://github.com/reduxjs/redux-essentials-example-app). After cloning the repo, you can install the tools for the project with `npm install`, and start it with `npm start`.
54+
You can also [clone the same project from this Github repo](https://github.com/reduxjs/redux-essentials-example-app). The project is configured to use [Yarn 4](https://yarnpkg.com/) as the package manager, but you can use any package manager ([NPM](https://docs.npmjs.com/cli/v10), [PNPM](https://pnpm.io/), or [Bun](https://bun.sh/docs/cli/install)) as you prefer. After installing packages, you can start the local dev server with the `yarn dev` command.
5555

56-
If you'd like to see the final version of what we're going to build, you can check out [the **`tutorial-steps` branch**](https://github.com/reduxjs/redux-essentials-example-app/tree/tutorial-steps), or [look at the final version in this CodeSandbox](https://codesandbox.io/s/github/reduxjs/redux-essentials-example-app/tree/tutorial-steps).
56+
If you'd like to see the final version of what we're going to build, you can check out [the **`tutorial-steps-ts` branch**](https://github.com/reduxjs/redux-essentials-example-app/tree/tutorial-steps-ts), or [look at the final version in this CodeSandbox](https://codesandbox.io/s/github/reduxjs/redux-essentials-example-app/tree/tutorial-steps-ts).
5757

5858
> We'd like to thank [Tania Rascia](https://www.taniarascia.com/), whose [Using Redux with React](https://www.taniarascia.com/redux-react-guide/) tutorial helped inspire the example in this page. It also uses her [Primitive UI CSS starter](https://taniarascia.github.io/primitive/) for styling.
5959
6060
#### Creating a New Redux + React Project
6161

62-
Once you've finished this tutorial, you'll probably want to try working on your own projects. **We recommend using the [Redux template for Vite](../../introduction/Installation.md#create-a-react-redux-app) as the fastest way to create a new Redux + React project**. It comes with Redux Toolkit and React-Redux already configured, using [the same "counter" app example you saw in Part 1](./part-1-overview-concepts.md). This lets you jump right into writing your actual application code without having to add the Redux packages and set up the store.
62+
Once you've finished this tutorial, you'll probably want to try working on your own projects. **We recommend using the [Redux templates for Vite and Next.js](../../introduction/Installation.md#create-a-react-redux-app) as the fastest way to create a new Redux + React project**. The templates come with Redux Toolkit and React-Redux already configured, using [the same "counter" app example you saw in Part 1](./part-1-overview-concepts.md). This lets you jump right into writing your actual application code without having to add the Redux packages and set up the store.
6363

6464
#### Exploring the Initial Project
6565

@@ -78,8 +78,6 @@ Let's take a quick look at what the initial project contains:
7878

7979
If you load the app now, you should see the header and a welcome message, but no functionality.
8080

81-
The project is configured to use [Yarn 4](https://yarnpkg.com/) as the package manager, but you can use any package manager ([NPM](https://docs.npmjs.com/cli/v10), [PNPM](https://pnpm.io/), or [Bun](https://bun.sh/docs/cli/install)) as you prefer.
82-
8381
With that, let's get started!
8482

8583
## Setting Up the Redux Store
@@ -189,16 +187,14 @@ Now that we have a store, we can use the Redux DevTools extension to view the cu
189187

190188
If you open up your browser's DevTools view (such as by right-clicking anywhere in the page and choosing "Inspect"), you can click on the "Redux" tab. This will show the history of dispatched actions and the current state value:
191189

192-
**[TODO] Update screenshot**
193-
194190
![Redux DevTools: initial app state](/img/tutorials/essentials/devtools-initial.png)
195191

196192
The current state value should be an object that looks like this:
197193

198194
```ts
199195
{
200196
counter: {
201-
value: 123
197+
value: 0
202198
}
203199
}
204200
```
@@ -468,6 +464,7 @@ In this example we're using ["uncontrolled" inputs](https://react.dev/reference/
468464
Import that component into `App.tsx`, and add it right above the `<PostsList />` component:
469465

470466
```tsx title="App.tsx"
467+
// omit outer `<App>` definition
471468
<Route
472469
path="/"
473470
element={
@@ -670,8 +667,11 @@ Let's recap what you've learned in this section:
670667
Here's what the app looks like so far:
671668

672669
<iframe
673-
class="codesandbox"
674-
src="https://stackblitz.com/github/reduxjs/redux-essentials-example-app/tree/ts-checkpoint-1/?ctl=1&embed=1&file=src%2Ffeatures%2Fposts%2FpostsSlice.ts&terminalHeight=0"
670+
class="codesandbox"
671+
src="https://codesandbox.io/embed/github/reduxjs/redux-essentials-example-app/tree/7f33de00afef79792250f314aa0da2d695ce2e8d?fontsize=14&hidenavigation=1&module=%2fsrc%2Ffeatures%2Fposts%2FpostsSlice.ts&theme=dark&runonclick=1"
672+
title="redux-essentials-example"
673+
allow="geolocation; microphone; camera; midi; vr; accelerometer; gyroscope; payment; ambient-light-sensor; encrypted-media; usb"
674+
sandbox="allow-modals allow-forms allow-popups allow-scripts allow-same-origin"
675675
></iframe>
676676
677677
## What's Next?
-44.8 KB
Loading
-1.81 KB
Loading
-5.23 KB
Loading
-22.4 KB
Loading

0 commit comments

Comments
 (0)