Open MilosTanaskovic opened 2 years ago
Adding Styles to Component
state handle (open this cart)
Handling Events
- Handling events with React elements is very similar to handling events on DOM elements. There are some syntax differences:
- Docs Handling Events in React
create new component (FeedbackStats)
- pass feedback from App.jsx to FeedbackStats.jsx (with Prop-Drilling)
- for(3 Reatings) - feedback.length
- for (Average Rating: 8.7) - take avarage with reduce() method and then / feedback.length
- avarage.toFixed(1).replace(/[.,]0$/, '')
Create your first Component & Props