{"version":"1.0","type":"rich","title":"Hook that rotates the items of an Array over time like a news ticker tape.","description":"This example demonstrates a React hook that continuously cycles through an array of items like a news ticker tape, presenting each value in sequence at a set interval. The hook, `useTickerTape`, takes an iterable and a speed in milliseconds, then maintains the current order of items in state. Using `useEffect` and `setTimeout`, it shifts the first item to the end of the array on each tick, triggering a re-render that displays the rotated list. The code relies on React’s `useState` and `useEffect` APIs, with the array spread operator to create immutable updates.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-bc2211f0a1c8ca4a2f07f045e30ec6f7?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}