Skip to content

Commit 6cee2fc

Browse files
author
Seth Lemmons
committed
Added project folder READMEs
removed unused project
1 parent ca9ed01 commit 6cee2fc

File tree

57 files changed

+449
-19529
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+449
-19529
lines changed

01-scaffolding/README.md

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,17 @@
1-
# 01 Scaffolding
1+
# 01 Ext JS to React: Scaffolding
22

3-
This subdirectory contains an app already generated with create-react-app, as
4-
described in the Scaffolding blog post (link here)
3+
This directory contains an example of a sample React application generated by
4+
[create-react-app](https://www.npmjs.com/package/create-react-app) as described
5+
in the
6+
[Scaffolding blog post](https://moduscreate.com/blog/ext-js-to-react-scaffolding/).
57

6-
Make sure you have yarn installed.
8+
Create-react-app is a great way to spin up a starter application with React and
9+
will be used extensively in this repo.
710

8-
To run the app server:
11+
## Example Projects
912

10-
```
11-
$ cd my-app
12-
$ yarn start
13-
```
13+
- [my-app](./my-app): sample starter app created by create-react-app
1414

15-
A browser window will automatically open and will load the app.
16-
17-
As you make edits to the sources in the my-app/ directory, the browser will
18-
automatically refresh to reflect your changes.
19-
20-
The blog post suggetss some simple edits to see this in action.
21-
22-
For a quick start, you can edit my-app/src/App.js and comment out one of the two
23-
import lines, for logo.svg OR logo2.svg.
15+
### Related Blog Article
2416

17+
[Ext JS to React: Scaffolding](https://moduscreate.com/blog/ext-js-to-react-scaffolding/)

01-scaffolding/my-app/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,38 @@
11
This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).
22

3+
# my-app
4+
5+
This directory contains an example of a sample React application generated by
6+
[create-react-app](https://www.npmjs.com/package/create-react-app) as described
7+
in the
8+
[Scaffolding blog post](https://moduscreate.com/blog/ext-js-to-react-scaffolding/).
9+
10+
This project contains a simple modification to demonstrate how to edit files
11+
within the starter app and see the changes update in the browser real-time (when
12+
following the steps outlined in the [Scaffolding blog article](https://moduscreate.com/blog/ext-js-to-react-scaffolding/)).
13+
14+
*Make sure you have npm installed.*
15+
16+
To run the app server:
17+
18+
```
19+
$ npm install
20+
$ npm start
21+
```
22+
23+
A browser window will automatically open and will load the app.
24+
25+
As you make edits to the sources in the my-app/ directory, the browser will
26+
automatically refresh to reflect your changes.
27+
28+
The blog post suggests some simple edits to see this in action.
29+
30+
For a quick start, you can edit my-app/src/App.js and comment out one of the two
31+
import lines, for logo.svg OR logo2.svg.
32+
33+
34+
# Create React App README
35+
336
Below you will find some information on how to perform common tasks.<br>
437
You can find the most recent version of this guide [here](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md).
538

01-scaffolding/my-app/src/App.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { Component } from 'react';
22

3-
//import logo from './logo.svg';
3+
// import logo from './logo.svg';
4+
// replace the original logo from the generated app with one we'll supply
45
import logo from './logo2.svg';
56
import './App.css';
67

02-instantiation/README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1-
# 02 Instantiation
1+
# 02 Ext JS to React: Class Instantiation and Code Style
22

3-
This subdirectory contains an app already generated with create-react-app, as
4-
described in the Instantiation blog post (link here). The source code has been
5-
modified to include the examples in the blog post so you can see it in action.
3+
React components can be created a couple of different ways. The
4+
[my-app](./my-app) example project demonstrates how React components may be
5+
instantiated.
66

7-
See my-app/src/App.js
7+
## Example Projects
8+
9+
- [my-app](./my-app): sample app demonstrating how React components are
10+
instantiated
11+
12+
### Related Blog Article
13+
14+
[Ext JS to React: Class Instantiation and Code Style](https://moduscreate.com/blog/extjs-react-class-instantiation-code-style/)
815

02-instantiation/my-app/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
# my-app
2+
3+
This directory contains an example of a sample React application generated by
4+
[create-react-app](https://www.npmjs.com/package/create-react-app) as described
5+
in the
6+
[Scaffolding blog post](https://moduscreate.com/blog/ext-js-to-react-scaffolding/).
7+
8+
This project contains an example `MyHeader` component which is instantiated
9+
within the `MyComponent` class. The `MyComponent` is then instantiated by the
10+
`App` component exported from [src/App.js](./src/App.js).
11+
12+
*Make sure you have npm installed.*
13+
14+
To run the app server:
15+
16+
```
17+
$ npm install
18+
$ npm start
19+
```
20+
21+
A browser window will automatically open and will load the app.
22+
23+
24+
# Create React App README
25+
126
This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).
227

328
Below you will find some information on how to perform common tasks.<br>

02-instantiation/my-app/src/App.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ const MyHeader = ({ text }) => {
88
)
99
}
1010

11+
// A MyClass instance is created when MyComponent is created since MyComponent
12+
// includes a MyHeader node in the returned JSX
1113
const MyComponent = () => {
1214
return (
1315
<div>
@@ -19,6 +21,7 @@ const MyComponent = () => {
1921
)
2022
}
2123

24+
// An instance of MyComponent is returned by the application's main view: App
2225
class App extends Component {
2326
render() {
2427
return (

03-defining-classes/README.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
1-
# 03 Defining Classes
1+
# 03 Ext JS to React: Defining Classes
22

3-
This subdirectory contains apps already generated with create-react-app, as
4-
described in the Instantiation blog post (link here). The source code has been
5-
modified to include the examples in the blog post so you can see it in action.
3+
This directory contains apps already generated with [create-react-app](https://www.npmjs.com/package/create-react-app), as described in the
4+
[Instantiation blog post](https://moduscreate.com/blog/extjs-react-class-instantiation-code-style/). The
5+
source code has been modified to include the examples in the blog post so you
6+
can see it in action.
67

7-
For each of the following examples, cd into the directory and run ```npm
8-
install``` followeed by ```npm run```
8+
## Defining Example Projects
99

10-
* a-functional-basic - simplest example, importing a single functional component
11-
* b-functional-property - simple example, importing a single functional component that takes a prop
12-
* c-class-instances - referencing class instances example, component declared as a proper JavaScript class.
13-
* d-refs - referencing child components
10+
- [a-functional-basic](./a-functional-basic): a simple, functional React
11+
component
12+
- [b-functional-property](./b-functional-property): a functional component with
13+
a single prop
14+
- [c-class-instances](./c-class-instances): a single component extending
15+
React.Component is defined including its own state and event handler
16+
- [d-refs](./d-refs): how to create references to elements within a React
17+
component
18+
19+
### Related Blog Article
20+
21+
[Ext JS to React: Defining Classes](https://moduscreate.com/blog/ext-js-react-defining-classes/)

03-defining-classes/a-functional-basic/src/MyComponent.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import React from 'react';
22

3+
// MyComponent is defined as a functional React component (one that is defined
4+
// as a function, rather than a class extending React.Component)
35
const MyComponent = () => {
46
return (
57
<div>Hello from Modus!</div>

03-defining-classes/b-functional-property/src/App.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ import React from 'react';
22
import MyContainer from './MyContainer'
33
import './App.css';
44

5+
// The main view of the application simply returns an instance of MyContainer
56
export default () => <MyContainer />;

03-defining-classes/b-functional-property/src/MyComponent.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import React from 'react';
22

3+
// MyComponent is defined as a functional React component (one that is defined
4+
// as a function, rather than a class extending React.Component). The component
5+
// accepts a single prop of `text` with a default value of "Hello from Modus"
36
const MyComponent = ({ text = 'Hello from Modus!' }) => {
47
return (
58
<div>{text}</div>

0 commit comments

Comments
 (0)