useSidebar
#
useSidebar hook. Use with the Sidebar component#
UsageHooks are a new addition in React. They let you use state and other React features without writing a class. To learn more abou hook in react please read : https://reactjs.org/docs/hooks-intro.html
The motivation for introducing hooks in React are:
- It’s hard to reuse stateful logic between components
- Complex components become hard to understand
- Classes confuse both people and machines
- Complex components become hard to understand
To solve these problems, Hooks let you use more of React’s features without classes.
We have tried to expose hooks used in the libary so that you can create your own visualisations if you wish.
#
Sample Syntax#
useSidebar configuration#
ExampleA simple sideBar example
#
Simple sidebarRender a simple sidebar