Poor baby maitra is too busy to add mobile responsiveness.
Please be a good person and use desktop 🥺
...
...
...
...
Name (on your left, iykyk)
It does the following things:
1. It randomly selects a Date Type for you.
2. Then based upon the date type, it selects date Place, Gift and Twist.
It uses Queue data structure to do this. This is how it works:
1. Those 3 things are jobs, they are added to a Job Queue and executed one after another.
2. Each job has 50% chances that they'll fail.
3. If they fail then rest of the jobs are executed as it is and the failed job is sent at the back of the queue for auto retry.
4. Once a job is done, it is removed from the queue.
5. Benefit of using a job queue is that you don't have the pass the next function as a callback function or use an useEffect hook.
5. Also this is ideal as the jobs are independent of each other.
New things I learnt and used for the first time: Queue, useCallback hook and Flowbite.
For more details and Source code, visit the GitHub Repo
maitra likes practical stuff, here's the github repo for this page