Giter VIP home page Giter VIP logo

react-from-zero's Introduction

react-from-zero's People

Contributors

alexpanchuk avatar brianodell avatar durkode avatar jamiemccrindle avatar jordanbtucker avatar kay-is avatar lex111 avatar logic0319 avatar nem035 avatar rtsao avatar sejas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-from-zero's Issues

Not careful about mutation

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.

Update to React 16

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?

  1. Someone needs to check what changed since 15.4.2
  2. Someone needs to write PRs to adress these changes

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.

More examples of lifecycle methods

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).

Lesson 10's preview doesn't match.

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.

Add codepen/jsfiddle/codesandbox links?

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.

Rename lesson files to preserve ordering?

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

New Lessons

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.

Misnomer: react-from-zero - not from zero

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;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.