Created
September 23, 2020 07:45
-
-
Save stenin-nikita/db0b3e153e5db9ba471644ac621c3ad5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const paths = declareAtom({}, on => [ | |
on(itemsAtom, (state, items) => { | |
const ims = values(items); | |
const paths = {}; | |
for (const id of ims) { | |
paths[id] = getPathForItem(id, items); | |
} | |
return paths; | |
}) | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment