sheleoni / hiragana-icecream

A React app for all to learn the basic alphabets in Japanese.
https://hiragana-icecream.sheleoni.com/
MIT License
1 stars 0 forks source link

Add CSS transition to display each question #26

Closed sheleoni closed 1 year ago

sheleoni commented 1 year ago

Current issue

if the next question is the same as the previous one, users may not know they are on a new question

Implementation

~probably with useEffect~ add key (from question number) to current question

Reference

Josh Comeau's Joy Of React module 5 - add CSS transition to element even if the new state has the same value as the previous state with the use of keys https://courses.joshwcomeau.com/joy-of-react/05-happy-practices/01.01-key-exercises

Additional Reading

https://react.dev/learn/you-might-not-need-an-effect