An object containing the current item and functions to navigate between items.
Example
const {currentItem: currentPage, next, prev} = useCycle(["Data input", "Contract", "Review"]) next() // currentPage is now "Contract" next() // currentPage is now "Review" prev() // currentPage is now "Review"
Custom hook to toggle between two items. The default toggles between
true
andfalse
. But you can pass in any two items to toggle between.