Skip to content

Add support for react 18#10

Draft
jemmyw wants to merge 4 commits intoaha-app:mainfrom
jemmyw:react18
Draft

Add support for react 18#10
jemmyw wants to merge 4 commits intoaha-app:mainfrom
jemmyw:react18

Conversation

@jemmyw
Copy link
Contributor

@jemmyw jemmyw commented Oct 26, 2023

No description provided.

* Updates in the given callback are batched together and only trigger a single
* render.
*/
export async function batch<T>(fn: () => Promise<T>): Promise<T> {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just jumping in, FYI, React 18 now batches all updates, not just updates in event handlers. Might reduce the need for manual batching if it all boils down to setState calls

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

batch in this context means deferring observer updates for a set of async operations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants