@rbxts/react-roblox
Advanced tools
Comparing version 0.3.2 to 0.3.3
{ | ||
"name": "@rbxts/react-roblox", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"description": "React DOM bindings for Roblox", | ||
@@ -29,6 +29,6 @@ "keywords": [ | ||
"dependencies": { | ||
"@rbxts/react": "0.3.2", | ||
"@rbxts/react-vendor": "0.3.2" | ||
"@rbxts/react": "0.3.3", | ||
"@rbxts/react-vendor": "0.3.3" | ||
}, | ||
"scripts": {} | ||
} |
import React from "@rbxts/react"; | ||
export interface RootOptions { | ||
hydrate?: boolean; | ||
hydrationOptions?: { | ||
onHydrated?: (suspenseNode: any) => void; | ||
onDeleted?: (suspenseNode: any) => void; | ||
mutableSources?: any[]; | ||
}; | ||
} | ||
export as namespace ReactRoblox; | ||
export = ReactRoblox; | ||
export interface Root { | ||
render(children: React.Element): void; | ||
unmount(): void; | ||
} | ||
declare namespace ReactRoblox { | ||
interface RootOptions { | ||
hydrate?: boolean; | ||
hydrationOptions?: { | ||
onHydrated?: (suspenseNode: any) => void; | ||
onDeleted?: (suspenseNode: any) => void; | ||
mutableSources?: any[]; | ||
}; | ||
} | ||
export function createRoot(container: Instance, options?: RootOptions): Root; | ||
interface Root { | ||
render(children: React.Element): void; | ||
unmount(): void; | ||
} | ||
export function createBlockingRoot(container: Instance, options?: RootOptions): Root; | ||
function createRoot(container: Instance, options?: RootOptions): Root; | ||
export function createLegacyRoot(container: Instance, options?: RootOptions): Root; | ||
function createBlockingRoot(container: Instance, options?: RootOptions): Root; | ||
/** | ||
* | ||
* @param children Anything that can be rendered with React, such as a piece | ||
* of JSX (e.g. `<div />` or `<SomeComponent />`), a | ||
* [Fragment](https://react.dev/reference/react/Fragment) (`<>...</>`), a | ||
* string or a number, or an array of these. | ||
* @param container The Roblox instance to portal to. | ||
* @param key A unique string or number to be used as the portal’s [key](https://react.dev/learn/rendering-lists#keeping-list-items-in-order-with-key). | ||
* @returns A React element that can be included into JSX or returned from a React component. | ||
*/ | ||
export function createPortal(children: React.Element, container: Instance, key?: string): React.Element; | ||
function createLegacyRoot(container: Instance, options?: RootOptions): Root; | ||
/** | ||
* Wrap any code rendering and triggering updates to your components into `act()` calls. | ||
* | ||
* Ensures that the behavior in your tests matches what happens in the browser | ||
* more closely by executing pending `useEffect`s before returning. This also | ||
* reduces the amount of re-renders done. | ||
* | ||
* @param callback A synchronous, void callback that will execute as a single, complete React commit. | ||
* | ||
* @see https://reactjs.org/blog/2019/02/06/react-v16.8.0.html#testing-hooks | ||
*/ | ||
export function act(callback: () => Promise<void>): Promise<undefined>; | ||
export function act(callback: () => void): void; | ||
/** | ||
* | ||
* @param children Anything that can be rendered with React, such as a piece | ||
* of JSX (e.g. `<div />` or `<SomeComponent />`), a | ||
* [Fragment](https://react.dev/reference/react/Fragment) (`<>...</>`), a | ||
* string or a number, or an array of these. | ||
* @param container The Roblox instance to portal to. | ||
* @param key A unique string or number to be used as the portal’s [key](https://react.dev/learn/rendering-lists#keeping-list-items-in-order-with-key). | ||
* @returns A React element that can be included into JSX or returned from a React component. | ||
*/ | ||
function createPortal(children: React.Element, container: Instance, key?: string): React.Element; | ||
/** | ||
* Wrap any code rendering and triggering updates to your components into `act()` calls. | ||
* | ||
* Ensures that the behavior in your tests matches what happens in the browser | ||
* more closely by executing pending `useEffect`s before returning. This also | ||
* reduces the amount of re-renders done. | ||
* | ||
* @param callback A synchronous, void callback that will execute as a single, complete React commit. | ||
* | ||
* @see https://reactjs.org/blog/2019/02/06/react-v16.8.0.html#testing-hooks | ||
*/ | ||
function act(callback: () => Promise<void>): Promise<undefined>; | ||
function act(callback: () => void): void; | ||
} |
11023
50
+ Added@rbxts/react@0.3.3(transitive)
+ Added@rbxts/react-vendor@0.3.3(transitive)
- Removed@rbxts/react@0.3.2(transitive)
- Removed@rbxts/react-vendor@0.3.2(transitive)
Updated@rbxts/react@0.3.3
Updated@rbxts/react-vendor@0.3.3