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

Optimize localized ui re-render #39

Open
petterik opened this issue Apr 16, 2018 · 2 comments
Open

Optimize localized ui re-render #39

petterik opened this issue Apr 16, 2018 · 2 comments

Comments

@petterik
Copy link
Owner

When lajt discovers changes in the ::pull op, make it easy to get the focused query for the data that has changed, such that one can map the focused query to the deepest component in the UI tree.

Example:

;; PeopleList query:
[{:people (om/get-query PersonItem)}]
;; PersonItem query:
[:person/primary-email]

If PeopleList has rendered some people and the :person/primary-email changes for any of those people, the ::pull op should recognize that [:person/primary-email] in query [{:people [:person/primary-email]}] belongs to a component of PersonItem, and it should be able to re-render the specific one that has changed (maybe by ident?).

@petterik
Copy link
Owner Author

Or this doesn't matter, as this is resolved really quickly by shouldComponentUpdate?

@petterik
Copy link
Owner Author

shouldComponentUpdate is not sufficient as parents will have their render triggered, even though only the component that cares about :person/primary-email in this case, should have to be re-rendered.

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

No branches or pull requests

1 participant