Created
May 8, 2019 07:57
-
-
Save splincode/e0d7c605fff6e0027c9b290e84cc8039 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| data = compose( | |
| over(lensPath(["keys"]), append(NEW_ITEM_ID)), | |
| over(lensPath(["count"]), x => x + 1), | |
| set(lensPath(["items", NEW_ITEM_ID]), { | |
| id: NEW_ITEM_ID, | |
| name: "ITEM-NEW", | |
| value: 0 | |
| }) | |
| )(INITIAL_DATA); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment