SHARE

Hey gang, in this React tutorial I’ll explain how we can change the state of a React component using the setState method. I’ll also talk a little bit about how React uses the virtual DOM to update our view in the browser.

—– COURSE LINKS:
+ Repo – https://github.com/iamshaunjp/react-playlist
+ Atom editor – https://atom.io/a
+ Download GIT – https://git-scm.com/
+ CMDER – http://cmder.net/

JS Playlist – https://www.youtube.com/playlist?list=PL4cUxeGkcC9i9Ae2D9Ee1RvylH38dKuET

HTML Playlist – https://www.youtube.com/playlist?list=PL4cUxeGkcC9ibZ2TSBaGGNrgh4ZgYE6Cc

NODEJS Playlist – https://www.youtube.com/playlist?list=PL4cUxeGkcC9gcy9lrvMJ75z9maRw4byYp

———————————————————————————————
You can find more front-end development tutorials on CSS, HTML, JavaScript, jQuery, WordPress & more on the channel homepage…

SUBSCRIBE TO CHANNEL – https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg?sub_confirmation=1

========== PSD to WordPress Playlist ==========

https://www.youtube.com/playlist?list=PL4cUxeGkcC9gnow7e45LQFkNVxwQ5BH-W

============ Node.js for Beginners Playlist =============

https://www.youtube.com/playlist?list=PL4cUxeGkcC9gcy9lrvMJ75z9maRw4byYp

============== The Net Ninja =====================

For more front-end development tutorials & to black-belt your coding skills, head over to – https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg or http://thenetninja.co.uk

================== Social Links ==================

Twitter – @TheNetNinja – https://twitter.com/thenetninjauk

13 COMMENTS

  1. what if we want to change changethe todos[0] 's value. I tried and it's asking for unrealistic syntax like : todos,[0]:newValue ? either way it's not working ..HELP

  2. When im doing this:

    var ager = setTimeout(function(){
    this.setState({
    age: 35
    });
    }.bind(this), 5000);

    I'm getting the error you said, but when I'm using an arrow function:

    var ager = setTimeout(() => {
    this.setState({
    age: 35
    });
    }, 5000);

    It works without binding, can you explain this to me? Thanks

LEAVE A REPLY

Please enter your comment!
Please enter your name here