Using useTransactionObservation_UNSTABLE(observableAtoms), with
export const observableAtoms = (args) => {
console.log(args)
}
I get:
atomInfo: Map(3) {"dateStart" => {鈥, "dateEnd" => {鈥, "currencyFormat" => {鈥}
atomValues: Map(0) {}
modifiedAtoms: Set(1) {"currencyFormat"}
previousAtomValues: Map(0) {}
transactionMetadata: {}
atomValues is empty, but from the persistence example (https://recoiljs.org/docs/guides/persistence), we should be able to get the atom from atomValues (atomValues.get(modifiedAtom))
Thoughts?
I believe they only show up in that after they're initialized (or perhaps if they're not in their initial state?), could be totally wrong with that though.
Looks like 0.0.9 is going to drop very soon with a re-implementation of this hook, so probably best to just sit tight.
For the deprecated API you need to also have a persistence_UNSTABLE property in the Atom with a type defined. The new hook simplifies this API, but 0.0.9 doesn't yet have the ability to iterate all atoms in the snapshot, there's another PR for that.
Most helpful comment
I believe they only show up in that after they're initialized (or perhaps if they're not in their initial state?), could be totally wrong with that though.
Looks like 0.0.9 is going to drop very soon with a re-implementation of this hook, so probably best to just sit tight.