useLayout
useLayout
provides functionality to switch between two types of layouts: Grid and List.
Functions
-
useLayout()
This is the main function exported by this file. It doesn't take any parameters and returns an object with two methods: navigateGrid and navigateList, and a layout state.
-
navigateGrid()
This function, returned by useLayout, sets the layout state to Grid. It doesn't take any parameters.
-
navigateList()
This function, also returned by useLayout, sets the layout state to List. It doesn't take any parameters.