Coder Social home page Coder Social logo

uidotdev / react-router-v4-course Goto Github PK

View Code? Open in Web Editor NEW
48.0 48.0 54.0 1.42 MB

Project for TylerMcGinnis.com's React Router course

Home Page: https://tylermcginnis.com/courses/react-router/

HTML 22.59% CSS 6.25% JavaScript 71.15%
react reactrouter

react-router-v4-course's People

Contributors

tylermcginnis 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

Watchers

 avatar  avatar  avatar  avatar  avatar

react-router-v4-course's Issues

Setting state in Home component

Hi Tyler,

Thanks for your great tutorial. I'm not sure where to ask questions about it so I'll ask it here, let me know if there is a better / other place for it.

In your video about the Home component, you get TeamNames and then you set the state:
Branch: home
File: React-Router-Course-Project/src/components/Home.js

From line 10:

  componentDidMount () {
    getTeamNames()
      .then((teamNames) => this.setState(() => ({
        teamNames
      })))
  }

Why are you initiating a new function, instead of immediately setting the state to teamNames, like this:

  componentDidMount() {
    getTeamNames()
      .then((teamNames) => this.setState({ teamNames }))
  }

Course Issues

Example comment

title: Why React?
issue: description of issue.

I'll "hide" the comment when it's fixed.

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.