This is a teaching repository for React created by Facebook.
The repo is sorted into single file react projects which can be run as standalone files ie they have React imported as a CDN into a single HTML file.
This repository is a combination of my own learning, also learning React from Udemy’s web developer course of 2018, and also from Egghead which has a course on React.
Also I have a much more complex set of standalone projects built with the create-react-app
here.
React Projects Built With create-react-app
Flavio Copes React Beginners Handbook
Build This Game On React Docs Tutorial
Free React Course https://scrimba.com/learn/learnreact
Live Play Around With React And Learn Basics - All In Browser
Examples - https://www.jqwidgets.com
[Facebook React Tutorial] https://facebook.github.io/react/tutorial/tutorial.html
Introduction And Getting Started
We can read about JSX in detail here
https://reactjs.org/docs/jsx-in-depth.html#html-tags-vs.-react-components
lifecycle methods in a class
// after component mounted
componentDidMount(){}
componentWillUnmount(){}
// this updates any time any part of the component updates
componentDidUpdate(){}
lifecycle methods in hooks
import React, {useState, useEffect} from 'react'
export default function MyComponent(props){
const [name, setName] = useState('some name');
// runs after initial render and after every update
useEffect(()=>{
// add javascript here to update whenever any part of the component updates
// for example could asynchronously update an api
axios.POST(url,name)...
})
return(<></>)
}
This is probably a whole new repo in itself but I am going to make a start here!
Author: philanderson888
Source Code: https://github.com/philanderson888/react
#react #reactjs #javascript