![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
async-reactor
Advanced tools
Render async Stateless Functional Components
npm install --save async-reactor
asyncReactor(component: Function, loader?: Component, error?: Component): Component
name | type | description |
---|---|---|
component | Function (async) | The async component you want to render |
loader (optionnal) | Component | Will be shown until the first component renders |
error (optionnal) | Component | Will be shown when an error occurred |
The returned value is a regular Component
.
This examples are exporting a regular React component. You can integrate it into an existing application or render it on the page.
See more examples here
import React from 'react'
import {asyncReactor} from 'async-reactor';
function Loader() {
return (
<b>Loading ...</b>
);
}
async function Time() {
const moment = await import('moment');
const time = moment();
return (
<div>
{time.format('MM-DD-YYYY')}
</div>
);
}
export default asyncReactor(Time, Loader);
import React from 'react';
import {asyncReactor} from 'async-reactor';
function Loader() {
return (
<h2>Loading ...</h2>
);
}
async function AsyncPosts() {
const data = await fetch('https://jsonplaceholder.typicode.com/posts');
const posts = await data.json();
return (
<ul>
{posts.map((x) => <li key={x.id}>{x.title}</li>)}
</ul>
);
}
export default asyncReactor(AsyncPosts, Loader);
FAQs
Render async Stateless Functional Components
The npm package async-reactor receives a total of 1,476 weekly downloads. As such, async-reactor popularity was classified as popular.
We found that async-reactor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.