Skip to content

Commit 81cfcdb

Browse files
committed
export flushSync from react package
1 parent a6c82c5 commit 81cfcdb

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/react/src/reconciler/reconciler.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import { hostConfig } from "./host-config"
66

77
export const reconciler = ReactReconciler(hostConfig)
88

9+
export const flushSync = reconciler.flushSync
10+
911
export function _render(element: React.ReactNode, root: RootRenderable) {
1012
const container = reconciler.createContainer(
1113
root,

packages/react/src/reconciler/renderer.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ import React, { type ReactNode } from "react"
33
import type { OpaqueRoot } from "react-reconciler"
44
import { AppContext } from "../components/app"
55
import { ErrorBoundary } from "../components/error-boundary"
6-
import { _render, reconciler } from "./reconciler"
6+
import { _render, reconciler, flushSync } from "./reconciler"
7+
8+
export { flushSync }
79

810
export type Root = {
911
render: (node: ReactNode) => void

0 commit comments

Comments
 (0)