kay-is / react-from-zero Goto Github PK
View Code? Open in Web Editor NEWA simple (99% ES2015 less) tutorial for React
Home Page: https://www.fullstackreact.com/react-from-zero/
License: GNU General Public License v2.0
A simple (99% ES2015 less) tutorial for React
Home Page: https://www.fullstackreact.com/react-from-zero/
License: GNU General Public License v2.0
The source of lesson 10 Example App doesn't match to the preview link. The preview link is of a simple Todo App while the code seems of a Timer App.
Preview link for lesson 11 is broken
Correct me if i'm wrong. I very well could be, since I'm starting from zero. This tutorial seems like more of a reference for implementing the individual techniques used in creating an app with react, rather than a tutorial 'from zero'. Shouldn't there be an explicit overview of the structure? To elucidate what I mean by structure, take, for instance, this question: where do i put these examples in a new instance of create-react-app / App.js ?
For reference ´App.js´:
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
class App extends Component {
render() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<h1 className="App-title">Welcome to React</h1>
</header>
<p className="App-intro">
To get started, edit <code>src/App.js</code> and save to reload.
</div>
);
}
}
export default App;
While updating to React 16 I saw that some new lessons could be nice.
Styling is only implicitly touched.
Context wasn't a public API until version 16, but now it is.
Some patterns could be nice. Things like Dependency Injection, Higher Order Components and Render Props.
Saw that this repository somehow ended up as one of the most popular courses on Github (based on stars, lol)
Anyway, the current version of React is 16.3.1 and this course is based on 15.4.2 Some things have changed and need to be adressed. (PropTypes, context, lifecycle methods, etc. pp.)
Also, maybe this course could use some updates in general.
So what steps need to be taken?
I'm using a rather old version of Babel to enable in-browser compilation of JSX, we probably need to check if this will still work with the new React version.
If someone is interested in this, just go for it.
It would be cool to have an example of componentDidUpdate
or componentWillReceiveProps
. E.g. when you make an Ajax request in componentDidMount
and need to re-fetch the data because the props have changed (a personal pet peeve of mine).
The first 9 lessons currently only use one digit for their numbering, so the filenames are not sorted numerically as a result:
0-object-elements.html
1-element-factory.html
10-example-app.html
...
16-advanced-integration.html
2-jsx.html
3-nested-elements.html
Might be nice to give them two-digit numbers so everything sorts cleanly: 01, 02, 03, ... 10, 11, 12
Great tutorial!
Some example could be more careful about mutating state. For example, https://github.com/kay-is/react-from-zero/blob/master/10-example-app.html#L93 updates this.state tasks
directly. A better approach would be to clone the array before mutating. (It doesn't matter in this particular example, but a tutorial should follow best practices.)
Similarly, https://github.com/kay-is/react-from-zero/blob/master/10-example-app.html#L93 changes the props directly, which is a big no-no with React.
I may be wrong though. I'm not a React expert, after all I'm reading a tutorial on React.
Content-wise, I think this repo is a pretty good intro to React, but I think adding links would make it easier for new React developers to digest the content.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.