Skip to content

Commit f5bb971

Browse files
committed
feat: Add examples
1 parent e6bf921 commit f5bb971

File tree

4 files changed

+41
-2
lines changed

4 files changed

+41
-2
lines changed

README.md

+9-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,19 @@ React From Zero to Hero or From the Ground Up
55
## Contents
66

77
1. [Lessons](#lessons)
8+
1. [Examples](#examples)
89

910
## Lessons
1011

11-
You can also check the lessons content at the [/lesssons](./lessons/) folder.
12+
You can also check the lessons content at the [`/lesssons`](./lessons/) folder.
1213

1314
1. [Fundamentals](./lessons/0.-Fundamentals/)
1415
1. [Pure functions](./lessons/0.-Fundamentals/1.-pure-functions/)
1516
1. [Memoization](./lessons/0.-Fundamentals/2.-memoization/)
16-
1. [Promises](./lessons/0.-Fundamentals/3.-promises/)
17+
1. [Promises](./lessons/0.-Fundamentals/3.-promises/)
18+
19+
## Examples
20+
21+
You can find some examples at [`/examples`](./examples/).
22+
23+
1. [Hello World](./examples/hello-world/)

examples/README.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Examples #
2+
3+
## Contents
4+
5+
1. [Current Examples](#current-examples)
6+
1. [Ideas](#ideas)
7+
8+
## Current Examples
9+
10+
1. [Hello World](./hello-world/)
11+
12+
## Ideas
13+
14+
- To-Do list, check out an old example I did at [react-todo-list](https://github.com/jofaval/reat-todo-list).

examples/hello-world/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Hello world #

examples/hello-world/hello-world.jsx

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import React from "react";
2+
import ReactDOM from "react-dom";
3+
4+
const HelloWorld = ({ name }) => {
5+
return <span className="hello-world">Hello {name}!</span>;
6+
};
7+
8+
const App = () => {
9+
<div id="app" className="app__container">
10+
<div className="app">
11+
{/* <HelloWorld name={'Your Name ;)'} /> */}
12+
<HelloWorld name={'World'} />
13+
</div>
14+
</div>
15+
};
16+
17+
ReactDOM.render(<App />, rootElement);

0 commit comments

Comments
 (0)