import React from 'react';
import LayoutStateRenderer from 'react-layout-state-renderer';
const CustomComponent = () => <h1>Custom Component</h1>;
const layoutState = {
root: {
key: 'root',
type: 'div',
props: {},
metadata: {},
children: ['1'],
},
'1': {
key: '1',
type: 'CustomComponent',
props: {},
metadata: {},
children: [],
parent: 'root',
},
};
const MyComponent = () => (
<LayoutStateRenderer
layoutState={layoutState}
rootKey="root"
components={{ CustomComponent }}
/>
);
export default MyComponent;
gregchamberlain/react-layout-state-renderer
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published