I stuck on the way to keep the workout data in a session in local storage
The situation is; that there is a bunch of input text taking "weight" and "reps" from the users.
<TextInput
style={addItemStyles.input}
// value={weight}
onChangeText={(e) => setweight(e)}
keyboardType="number-pad"
returnKeyType="done"
/>
<TextInput
label="Reps"
style={addItemStyles.input}
// Value={reps}
onChangeText={(e) => setReps(e)}
keyboardType="number-pad"
returnKeyType="done"
/>
in a single exercise, I want to take 3 sets (Weight & reps) and save them into an array.
settotalSet((current) => [...current, data]);
Then I need to keep several sets of data like this but belong to other exercises
I need to hear your advice to choose the best way to keep this data accessible in app during the workout session.
Do I have to use useReducer, use context, or Redux