Open lenhuthao0777 opened 11 months ago
Hello @lenhuthao0777, nice work!
Final result: ✅ passed
-> isOpen
-> isOpenModal
-> type
-> modalType
To enhance maintainability and readability, it's advisable to separate the states for managing books and modal handlers in the Context API. This separation can make your code more organized, prevent potential memory leaks as the state grows, and make it easier to manage in the long term.
Consider using conditional rendering to add the dark
class to the className
property of the root element (e.g., App.js
) instead of toggling it directly on the html
element. This approach is more in line with React's declarative nature and can make your code easier to manage and maintain.
class-variance-authority
. This will make your code more in line with Tailwind's conventions and simplify your styles.
Link demo: https://df-frontend-2023-reactjs.vercel.app/