Function useRecoilCallback
- useRecoilCallback<Args, Return>(fn, deps?): ((...args) => Return)
Type Parameters
- Args extends readonly unknown[]
- Return
Parameters
- fn: ((interface) => ((...args) => Return))
- (interface): ((...args) => Return)
Returns ((...args) => Return)
Optional deps: readonly unknown[]
Returns ((...args) => Return)
Returns a function that will run the callback that was passed when calling this hook. Useful for accessing Recoil state in response to events.