Skip to main content

errorSelector(message)

一个总是抛出已有错误的 selector

function errorSelector(message: string): RecoilValueReadOnly

示例#

const myAtom = atom({  key: 'My Atom',  default: errorSelector('Attempt to use Atom before initialization'),});