This is a solution to the Advice generator app challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Users should be able to:
- View the optimal layout for the app depending on their device's screen size
- See hover states for all interactive elements on the page
- Generate a new piece of advice by clicking the dice icon
In Astro, we need to include a directive called client:load
to enable the use of React's useEffect
hook. This is because Astro renders static HTML pages by default. To make a component interactive, we must specify that it should be hydrated.
<MyReactComponent client:load />
- Astro islands - This helped me understand Islands architecture in Astro.