This is the code where I am defining my atoms
,
import { io } from "socket.io-client"; import { atom, useRecoilState } from 'recoil';
export const count = atom({
key: 'count',
default: 0 });
export const socketConnectionState = atom({
key: 'socketConnectionState',
default: io('https://localhost:8001') });
This is causing error
TypeError: Cannot assign to read only property '_callbacks' of object '#<_Request>'
I want to use recoil
for this as I want to use this same socket in different files so making new ones causes irregularities.
Help me find a fix.