themesberg / themesberg/flowbite-react
Add `useToast` hook
Open
Nobody has claimed this yet.
:rocket: enhancement
help wanted
- Dominant language
- TypeScript
- Stars
- 2.1k
- Forks
- 506
- PR merge metrics
- No merged PRs in 30d
Description
- I have searched the Issues to see if this bug has already been reported
- I have tested the latest version
Summary
An example would be:
const [ dismiss ] = useToast('message', 5000); // 5000 is duration
// ... later in code somewhere ...
dismiss(); // for manual dismissal
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing toast component and related hook patterns in the repository, then review how comparable behavior is tested. Done means a useToast hook supports the shown message and duration arguments and returns a dismiss function for manual dismissal, with coverage for those behaviors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100