hoda-react
Version:
<div align="center"> <h1>:construction: flowbite-react (unreleased) :construction:</h1> <p> <a href="https://flowbite-react.com"> <img alt="Flowbite - Tailwind CSS components" width="350" src=".github/assets/flowbite-react-github.png"> <
10 lines (9 loc) • 333 B
JavaScript
import { createContext, useContext } from 'react';
export const RatingContext = createContext(undefined);
export function useRatingContext() {
const context = useContext(RatingContext);
if (!context) {
throw new Error('useRatingContext should be used within the RatingContext provider!');
}
return context;
}