The component works exactly like below:
<Multiviews onSelect={function(e) {}} defaultView="view2" views={{ view1: { name: 'First View', view: () => (
This is the content of the first subview
)
},
view2: {
name: 'Second view',
view: () => (This is the content of the second subview
)
},
views3: ...
}}
/>
- npm install
- npm start
- visit
http://localhost:8080/