Returns a list of components. Similar to React’s Fragment.
Because a function can only return one top-level component, this component is used for wrapping a list of top-level components.
1 2import ForgeUI, { Fragment } from '@forge/ui';
Name | Type | Required | Description |
---|---|---|---|
children | Array<ForgeComponent> | Yes | A container for displaying multiple components. Can contain any UI kit component. |
1 2const App = () => ( <Fragment> <Text>Hello world!</Text> <Button text="Do something" onClick={onClick} /> </Fragment> );
Rate this page: