import { Atom , prism } from '@theatre/dataverse' ; /**
 * A prism hook that converts `val` into an atom, and returns that atom.
 */ export const valToAtom = < T > ( key , vals ) : Atom < T > => { const a = prism . memo ( key , ( ) => new Atom ( vals ) , [ ] ) ; a . setState ( vals ) ; return a ; } ;