Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace cursors with zippers #52

Open
4 tasks
ognen opened this issue Jul 14, 2017 · 2 comments
Open
4 tasks

Replace cursors with zippers #52

ognen opened this issue Jul 14, 2017 · 2 comments

Comments

@ognen
Copy link
Member

ognen commented Jul 14, 2017

Internally, replace the usage of cursors with zippers.

In the public facing API:

  • Element components receive a new property location which is the current zipper
  • The element property is no longer a cursor
  • uiForElement and uiForElements are removed
  • uiFor accepts the following things as the parameter
    • a string or an array of strings which is treated as now (a key path)
    • a zipper movement function which is interpreted as instruction on how to move from the current location to the one for which we require the UI
    • a selector (zip.select) which is interpreted as an instruction on the selection of elements for which we require an ui for

Given our current top-down architecture, care must be taken so that uiFor does not accept a movement up or sideways from the current location (otherwise shouldComponentUpdate shortcutting won't work).

Consider rewriting the updates reducer more elegantly.

@ognen
Copy link
Member Author

ognen commented Jul 14, 2017

Depends on #53 for the selector feature.

@andon
Copy link
Member

andon commented Dec 14, 2018

Consider rewriting the updates reducer more elegantly.

🤔 I wonder what this means...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants