React Coroutine

Please welcome: React Coroutine v1.0

#reactjs

  • React Coroutine is a small library which leverages the power of modern JavaScript to provide seamless way in creating stateful components with different purposes.
  • This library just use a coroutine as a React component.
  • Use NPM or Yarn to install the library from NPM registry.
  • Plugins like transform-async-to-generator and can help you with it and they might be already a part of presets your configuration uses.
  • You are free to use it in commercial projects as long as the copyright is left intact.

Make your async components compact and descriptive by leveraging the power of the language features

@alexeyraspopov: Please welcome: React Coroutine v1.0

#reactjs

React Coroutine is a small library which leverages the power of modern JavaScript to provide seamless way in creating stateful components with different purposes.

This library just use a coroutine as a React component. No API to learn and keep up to date, no additional workflows or blackboxes to worry about.

Use NPM or Yarn to install the library from NPM registry.

npm install react-coroutine

import React from ‘react’; import Coroutine from ‘react-coroutine’; import Posts from ‘PostAPI’; import PostList from ‘PostList.react’; async function PostListCo() { try { const posts = await Posts.retrieve(); return ; } catch (error) { return

Unable to fetch posts.

; } } export default Coroutine.create(PostListCo);

syntax (for async functions or generators). Plugins like transform-async-to-generator and transform-async-generator-functions can help you with it and they might be already a part of presets your configuration uses.

React Coroutine licensed under the MIT.

The MIT License places almost no restrictions on what you can do with this lib. You are free to use it in commercial projects as long as the copyright is left intact.

Amazing awsm.css built by Igor Adamenko was used for making the website.

Code examples use FiraCode font family.

React Coroutine