React redux, Uncaught TypeError: Cannot assign to read only property ‘current’ of object ‘#’

I am making a website to modify db data. first, The structure of the component is as follows

When the row …

How to insert properties and functions inside ref?

How can I insert properties and functions inside a ref? Like this example: Then I want to use the propertie loading and the function onTest that way: How can I do that? Answer You cannot set ref on functional components because they don’t have an instance. You may not use the ref attribute on function components because they don’t have instances. (source: https://reactjs.org/docs/refs-and-the-dom.html#accessing-refs) To make your example working you need to convert <MyComponent /> to class component.