An open API service indexing awesome lists of open source software.

https://github.com/the-road-to-learn-react/react-asynchronous-request-setstate-unmounted-component

Example of preventing to set state on unmounted React Components
https://github.com/the-road-to-learn-react/react-asynchronous-request-setstate-unmounted-component

asynchronous react reactjs setstate

Last synced: 2 months ago
JSON representation

Example of preventing to set state on unmounted React Components

Awesome Lists containing this project

README

        

# react-asynchronous-request-setstate-unmounted-component

[![Build Status](https://travis-ci.org/the-road-to-learn-react/react-asynchronous-request-setstate-unmounted-component.svg?branch=master)](https://travis-ci.org/the-road-to-learn-react/react-asynchronous-request-setstate-unmounted-component) [![Slack](https://slack-the-road-to-learn-react.wieruch.com/badge.svg)](https://slack-the-road-to-learn-react.wieruch.com/) [![Greenkeeper badge](https://badges.greenkeeper.io/the-road-to-learn-react/react-asynchronous-request-setstate-unmounted-component.svg)](https://greenkeeper.io/)

Showcasing how to prevent to set state on unmounted React components when having an asynchronous request in place. [Read more about it](https://www.robinwieruch.de/react-warning-cant-call-setstate-on-an-unmounted-component).

## Installation

* `git clone [email protected]:the-road-to-learn-react/react-asynchronous-request-setstate-unmounted-component.git`
* cd react-asynchronous-request-setstate-unmounted-component
* npm install
* npm start
* visit `http://localhost:3000`