Skip to content

Latest commit

 

History

History
49 lines (28 loc) · 696 Bytes

File metadata and controls

49 lines (28 loc) · 696 Bytes

tinky


tinky / render

Function: render()

render(node, options?): Instance

Mount a component and render the output.

Parameters

node

ReactNode

The React component to render.

options?

RenderOptions

Render options or the stdout stream.

Returns

Instance

The Tinky instance.

Examples

import { render, Text } from "tinky";

render(<Text>Hello World</Text>);
import { render, Text } from "tinky";

const { unmount } = render(<Text>Hello World</Text>);

setTimeout(() => {
  unmount();
}, 1000);