-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat (framework/react): first version of React basics
- Loading branch information
Showing
14 changed files
with
1,342 additions
and
1,656 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,4 @@ permalink: /frameworks/slides/ | |
|
||
JavaScript frameworks. | ||
|
||
(under construction) | ||
* [React](/frameworks/react/slides/) |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
title: Thinking in React | ||
permalink: /frameworks/react/slides/ | ||
--- | ||
|
||
React concepts and architecture. React programming using JSX and components. | ||
|
||
[Start Here]({{ site.baseurl }}/frameworks/react/slides/01-start-jsx/) | ||
|
||
## GitHub Examples | ||
|
||
[web2learn/frameworks/react](https://github.com/santanche/web2learn/tree/master/frameworks/react) |
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 |
---|---|---|
@@ -0,0 +1,144 @@ | ||
--- | ||
marp: true | ||
theme: uncover | ||
class: invert | ||
permalink: /frameworks/react/slides/01-start-jsx/ | ||
--- | ||
|
||
Black & White Series | ||
|
||
# React & JSX | ||
|
||
#### Thinking in React | ||
|
||
--- | ||
|
||
<!-- class: lead --> | ||
|
||
# React | ||
|
||
![width:150px](../../../../frameworks/react/slides/images/react-logo.svg) | ||
|
||
* https://react.dev/ | ||
* JavaScript Framework | ||
* to produce interactive (reactive) interfaces | ||
* founded in JSX and Components | ||
|
||
--- | ||
|
||
# First React Program | ||
|
||
Available at: [frameworks/react/1-basic-raw](https://github.com/santanche/web2learn/tree/master/frameworks/react/1-basic-raw) | ||
|
||
--- | ||
|
||
#### First React Program | ||
# HTML Root Element | ||
|
||
~~~html | ||
<body> | ||
<div id="root"></div> | ||
... | ||
</body> | ||
~~~ | ||
|
||
--- | ||
|
||
#### First React Program | ||
# Importing Libraries from CDN | ||
|
||
CDN - Content Delivery Network | ||
|
||
~~~html | ||
<script src="https://unpkg.com/react/umd/react.development.js"> | ||
</script> | ||
<script src="https://unpkg.com/react-dom/umd/react-dom.development.js"> | ||
</script> | ||
~~~ | ||
|
||
--- | ||
|
||
# First React Program - Script | ||
|
||
~~~js | ||
const { createRoot } = ReactDOM | ||
const root = createRoot(document.getElementById('root')) | ||
~~~ | ||
|
||
![width:750px](../../../../frameworks/react/slides/images/root.svg) | ||
|
||
--- | ||
|
||
# First React Program - Script | ||
|
||
~~~js | ||
const { createElement } = React | ||
root.render( | ||
createElement('h1', null, 'Velocirest') | ||
) | ||
~~~ | ||
|
||
![width:750px](../../../../frameworks/react/slides/images/render.svg) | ||
|
||
--- | ||
|
||
# JSX | ||
|
||
* Proposed by Facebook | ||
* https://facebook.github.io/jsx/ | ||
* XML constructs within JavaScript | ||
* Requires the use of a Transpiler (preprocessor) | ||
|
||
--- | ||
|
||
# React with JSX | ||
|
||
~~~js | ||
root.render( | ||
<h1>Velocirest</h1> | ||
) | ||
~~~ | ||
|
||
![width:750px](../../../../frameworks/react/slides/images/render-jsx.svg) | ||
|
||
--- | ||
|
||
# JSX and Babel Transpiler | ||
|
||
~~~html | ||
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script> | ||
|
||
<script type="text/babel"> | ||
... | ||
</script> | ||
~~~ | ||
|
||
![width:750px](../../../../frameworks/react/slides/images/render-transpiler.svg) | ||
|
||
--- | ||
|
||
# Babel Transpiler | ||
|
||
![width:750px](../../../../frameworks/react/slides/images/babel.svg) | ||
|
||
--- | ||
|
||
# References | ||
|
||
* [Writing Markup with JSX](https://react.dev/learn/writing-markup-with-jsx) | ||
|
||
* Eloquent JavaScript - https://eloquentjavascript.net/ | ||
|
||
![Eloquent JavaScript](../../../../javascript/slides/images/eloquent-javascript.png) | ||
|
||
--- | ||
|
||
<!-- class: invert --> | ||
|
||
## André Santanchè | ||
|
||
www.ic.unicamp.br/~santanch/ | ||
|
||
## Web2Learn | ||
|
||
santanche.github.io/web2learn/ |
Oops, something went wrong.