Skip to content
Advertisement

Tag: recoiljs

Cannot assign to read only property ‘current’ in React useRef

i used react useRef in functional components to get link on html object and store it in Recoil atom. For example: But when my Parent component ummounts I get error: react-dom.development.js:20997 Uncaught TypeError: Cannot assign to read only property ‘current’ of object ‘#’ in file reac-dom.development.js I can’t imagine what’s the problem; Answer The issue here is that atoms are

Advertisement