0.0.10 • Published 7 years ago

react-concurrency v0.0.10

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

Build Status

React Concurrency

An implementation of ember-concurrency for React components. This is still a work in progress.

Current Implemented Features

  • Tasks get automatically canceled when the component they live on is destroyed
  • Derived state with isRunning and isIdle flags
  • promise based timeout

Installation

npm install react-concurrency

Why?

Have you ever seen the error?

Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the YourComponent component.

There are a few ways to deal with this in React. Read about them here.

In Ember, this is solved with a brilliant addon called ember-concurrency. This library attempts to do the same but for React components while keeping a similar API. If you haven't read about ember-concurrency, check out this great article: ember-concurrency: the solution to so many problems you never knew you had.

Run the examples here: https://github.com/skaterdav85/react-concurrency-demos.

About This Repo

This repo was created with react-npm-boilerplate.

  1. Clone this repo
  2. Inside cloned repo run npm install
  3. If you want to run tests: npm test or npm run testonly or npm run test-watch. You need to write tests in __tests__ folder. You need at least Node 4 on your machine to run tests.
  4. If you want to run linting: npm test or npm run lint. Fix bugs: npm run lint-fix. You can adjust your .eslintrc config file.
  5. If you want to run transpilation to ES5 in dist folder: npm run prepublish (standard npm hook).
0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago