mirror of
https://github.com/microsoft/frontend-bootcamp.git
synced 2026-01-26 14:56:42 +08:00
adding documentation
This commit is contained in:
20
docs/step2-06/README.md
Normal file
20
docs/step2-06/README.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Step 2.6
|
||||
|
||||
[Lessons](../) | [Exercise](./exercise/) | [Demo](./demo/)
|
||||
|
||||
Redux: Dispatching Actions and Examining State.
|
||||
|
||||
In this step, we learn about `dispatch` and `getState()`. Dispatching action messages to the store is the only means by which to inform the reducers to modify the shared state tree.
|
||||
|
||||
We also see how we may compose the reducers according to the shape.
|
||||
|
||||
If you want a really neat UI to show what the store looks when actions are dispatched to the store, use this Chrome extension:
|
||||
https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd
|
||||
|
||||
# Exercise
|
||||
|
||||
1. open the `exercise/src/reducers/reducer.spec.ts`
|
||||
|
||||
2. Follow the instructions to fill out the reducer tests
|
||||
|
||||
3. Run the tests with `npm test`
|
||||
@@ -1,8 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
For this step, we look at unit testing. Run
|
||||
<pre>npm test</pre>
|
||||
in the command line.
|
||||
<script src="../../step2-06/demo/step2-06/demo.js"></script></body>
|
||||
<head>
|
||||
<link rel="stylesheet" href="../../assets/step.css" />
|
||||
</head>
|
||||
<body class="ms-Fabric">
|
||||
<div id="markdownReadme"></div>
|
||||
<div id="app">
|
||||
For this step, we look at unit testing. Run
|
||||
<pre>npm test</pre>
|
||||
in the command line.
|
||||
</div>
|
||||
<script src="../../step2-06/demo/step2-06/demo.js"></script><script src="../../markdownReadme/markdownReadme.js"></script></body>
|
||||
</html>
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
For this step, we look at unit testing. Run
|
||||
<pre>npm test</pre>
|
||||
in the command line.
|
||||
<script src="../../step2-06/exercise/step2-06/exercise.js"></script></body>
|
||||
<head>
|
||||
<link rel="stylesheet" href="../../assets/step.css" />
|
||||
</head>
|
||||
<body class="ms-Fabric">
|
||||
<div id="markdownReadme"></div>
|
||||
<div id="app">
|
||||
For this step, we look at unit testing. Run
|
||||
<pre>npm test</pre>
|
||||
in the command line.
|
||||
</div>
|
||||
<script src="../../step2-06/exercise/step2-06/exercise.js"></script><script src="../../markdownReadme/markdownReadme.js"></script></body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user