Basically a component should only do one thing.
Its almost like building the app strictly using html where its not interactive. You should not be using things like state.
Start building the reusable components of the data model.
Does it remain unchanged over time? Is it passed in front of a parent via props? Can you compute it based on existing state or props in your component?
Frequently, you can place the state directly within their shared parent.
Alternatively, you can position the state within a component higher up in the hierarchy than their common parent.
When you can’t identify a suitable component for housing the state, establish a new component exclusively for that purpose. Then, incorporate it into the hierarchy above the common parent component.
A functions that operates on other functions.
It is basically just a function that compares if m is greater than n. In the following lines you n is given the value of 10. So when we console.log the number 11 it returns it as true because it is in fact greater than 10.
For map you may be writing a function that creates arrays and then then use a map functions to iterate through each elem4ent over the array and possibly to even create a new array from that.