Remove Atom.set|getState()
This commit is contained in:
parent
e0465ed3fa
commit
3c68ed26ad
15 changed files with 33 additions and 50 deletions
|
@ -4,7 +4,7 @@
|
|||
* @packageDocumentation
|
||||
*/
|
||||
|
||||
import type { Prism} from '@theatre/dataverse';
|
||||
import type {Prism} from '@theatre/dataverse'
|
||||
import {Atom} from '@theatre/dataverse'
|
||||
import {prism, val} from '@theatre/dataverse'
|
||||
import {findIndex} from 'lodash-es'
|
||||
|
@ -62,7 +62,7 @@ export function usePrism<T>(
|
|||
if (!atomRef.current) {
|
||||
atomRef.current = new Atom(fnAsCallback)
|
||||
} else {
|
||||
atomRef.current.setState(fnAsCallback)
|
||||
atomRef.current.set(fnAsCallback)
|
||||
}
|
||||
|
||||
const prsm = useMemo(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue