Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const refs = React.useRef<any[]>([]);
- refs.current = Object.entries(mutationData).map(
- (_, index) => refs.current[index] ?? React.createRef(),
- );
- {arr.map((item, index) => (<Input ref={refs.current[index]} />)}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement