text: import { useState, useEffect } from 'react';
  
  export const useInitialState = (API) => {
    const [videos, setVideos] = useState({ mylist: [], trends: [], originals: [] });
  
    useEffect(() => {
      fetch(API)
        .then((response) => response.json())
        .then((data) => {
          setVideos(data);
        });
    }, []);
  
    return videos;
  };
  