- Published on
Recoil Duplicate atom key
- Authors
- Name
- duluwa.com
方法 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>
}