Published on

Recoil Duplicate atom key

Authors
  • avatar
    Name
    duluwa.com
    Twitter

方法 1:.env 文件修改

RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED=false

方法 2:代码修改

configs/recoil.ts
import { RecoilEnv } from 'recoil'

RecoilEnv.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED = false
App.tsx
import './configs/recoil'

function App() {
  return <RecoilRoot></RecoilRoot>
}

参考:https://tesseractjh.tistory.com/310