I have a simple question. If I have 1 component that gets rendered whenever a variable called count=1. How would I make this dynamic so that the number of components that get rendered will always equal count? I could do the if, else if but that would be tediuous. I was thinking something more like a for loop maybe? Here is some code I would like to render n times. It is simply a single component as shown below.
return(
<div>
<SensorComponent user={props.user}
moisture={value}
historicalData={recentHistoricalData}
allHistoricalData={allHistoricalData}
userInformation={userInformation}
setUserInformation={setUserInformation}
componentDetails={props.componentDetails}
setComponentDetails={props.setComponentDetails}
/>
</div>
)