Go ProSign in

This Lesson is for Members

Subscribe today and get access to all lessons! Plus direct HD download for offline use, enhances transcripts, member comment forums, and iTunes "podcast" RSS feed. Level up your skills now!

Unlock This Lesson

Already subscribed? Sign In

Leverage New Features of React 16

Leverage New Features of React 16


    Call setState with null to Avoid Triggering an Update in React 16

    Nik GrafNik Graf

    Sometimes it’s desired to decide within an updater function if an update to re-render should be triggered. Calling .setState with null no longer triggers an update in React 16. This means we can decided if the state gets updated within our .setState method itself!

    In this lesson we'll explore how this works by refactoring a city map app that updates even if you choose the same map twice.

    You must be a Member to view code