-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Thunk: using selector of underlaying view #952
Comments
I never used thunks, so i cannot really give an informed answer |
@wclr , what's your proposition? :) And which lines of code we have to reconsider? |
Here in copyToThunk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thunk uses currently its own selector (sel) fully disregarding and replacing the selector of passed view in the resulting node. To be consistent more often one has to duplicate into a thunk selector (which defines at least node's tag) that is used in a view function, that is just a lazy wrapper around a given view.
What if thunk didn't replace the selector of the underlying view? This could be accomplished with several tweaks:
Use thunk selector to compare nodes and not use it in the resulting view, but this does not require a selector but some kind of key, though we already have the key (actually key and selector always seemed to have a kind of overlapping intentions). So probably the selector could be just removed and the thunk key is required(?).
If now calculated view's selector is used then it could be used to compare nodes to understand if the node has to be recreated.
So maybe I missing something and the current thunk design has more important considerations underneath?
@paldepind @jvanbruegge
The text was updated successfully, but these errors were encountered: