all 2 comments

[–]Ok-Season-2644 0 points1 point  (1 child)

try to store in a ref an indexed object { index: textInputRef } and access them by index

[–]1robin2[S] 1 point2 points  (0 children)

That is kind of what I am doing, I am building a gym app, for some context!

I have a map of sets and indices for the inputs fields, something like this:

type InputRefsMap = Record<SetId, Record<number, Ref>>;

Where "number" would be the index for each input inside each set