-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* english improvements for problem 1 * Note about JSX * The "omitted" sections confused me at first Omitting them doesn't save a ton of space, and it's not clear that you're not supposed to change them from the previous iteration, so I put them back. * Better solution to the "omitted" confusion Now that I've passed this exercise and see that the following exercises use the same pattern, I put things back how they were but added an explanation of how to read the sample * english improvements for isomorphic problem descr * improved english problem file for Events exercise * some improved english explanation in the isomorphic lesson
- Loading branch information
1 parent
6185515
commit 458470b
Showing
5 changed files
with
43 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ First things first, let's print `Hello World`! | |
|
||
First, create the directory where you will write your code. It needs to contain a [package.json](https://docs.npmjs.com/getting-started/using-a-package.json) file | ||
for npm to know in which folder to install the subsequent packages - `npm init` does this for us. | ||
|
||
You can change `learnyoureact` to any name you like. | ||
|
||
`$ mkdir learnyoureact; cd learnyoureact; npm init -y;` | ||
|
@@ -10,11 +11,9 @@ Start by installing the required modules. Run this command: | |
|
||
`$ npm install --save react react-dom express body-parser [email protected] [email protected]` | ||
|
||
You can see `node_modules` directory made. | ||
Files of module is in the directory. | ||
This will create your `node_modules` directory and store a bunch of modules in it. | ||
|
||
Next, create `program.js`. | ||
Folder structure is below. | ||
Next, create `program.js`. Folder structure is below. | ||
|
||
``` | ||
learnyoureact | ||
|
@@ -48,12 +47,13 @@ app.listen(app.get('port'), function() { | |
``` | ||
|
||
The code above creates a small Express server that renders our React | ||
components. If someone navigates to `/`, `views/index.jsx` will be rendered. This program uses the `express-react-views` module. | ||
components. If someone navigates to `/`, it will render `views/index.jsx`. | ||
This program uses the `express-react-views` module for view rendering. | ||
|
||
Next, create a `views` directory in the same directory as `program.js`. | ||
After that, create `index.jsx` in the 'views' directory. | ||
Next, create a `views` directory in the same directory as `program.js`, | ||
and create `index.jsx` in the 'views' directory. | ||
|
||
Please copy the code below into `index.jsx` | ||
Copy the code below into `index.jsx`: | ||
|
||
``` | ||
import React from 'react'; | ||
|
@@ -67,8 +67,8 @@ export default class TodoBox extends React.Component{ | |
} | ||
``` | ||
|
||
This code uses the optional React.js JSX syntax to create our views, which we | ||
shall use throughout the rest of this workshop. | ||
This code uses the optional React.js JSX syntax to create our views, | ||
which we shall use throughout the rest of this workshop. | ||
|
||
You can find the React.js docs here: https://facebook.github.io/react/docs/getting-started.html | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters