jeudi 11 mars 2021

having n states in react, assuming that n won't be received in props

How could I have n states in a React component

Assuming that the component won't receive this n value in any props, is something that it will get from a database

Using useState will create the state, setState for each pair, but I need n pairs

Rafael




Aucun commentaire:

Enregistrer un commentaire