nexora / frontend /src /context /TvshowContext.js
ChandimaPrabath's picture
update
0527ba9
raw
history blame
No virus
454 Bytes
'use client';
import React, { createContext, useContext, useState } from 'react';
const TvShowsContext = createContext();
export const TvShowsProvider = ({ children }) => {
const [tvshows, setTvshows] = useState([]);
return (
<TvShowsContext.Provider value={{ tvshows, setTvshows }}>
{children}
</TvShowsContext.Provider>
);
};
export const useTvShowsContext = () => {
return useContext(TvShowsContext);
};