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

Verify reagent/react-native rendering assumptions #9043

Closed
yenda opened this issue Sep 25, 2019 · 0 comments
Closed

Verify reagent/react-native rendering assumptions #9043

yenda opened this issue Sep 25, 2019 · 0 comments

Comments

@yenda
Copy link
Contributor

yenda commented Sep 25, 2019

Problem

We need to test the following assumptions

  • if I have 5 subscriptions on a view, and the 5 of them change,
    does the view re-render once, 5, or some other random number of times?

  • when I pass a map to a component, and I destructure that map in
    the arguments and only use keys that don't change, does the component
    still re-rerenders when the map changes?

Reagent tracks any dereferences to ratoms made during a component’s render function
render functions are rerun when their input data changes

(defview recovery-phrase []
(letsubs [flow [:hardwallet-flow]]
[react/view
;; is this re-rendered?
[display-recovery-phrase flow]
(if (= flow :create)
[display-recovery-phrase]
[enter-recovery-phrase])]))

(defview recovery-phrase []
(letsubs [flow [:hardwallet-flow]]
[react/view
[display-recovery-phrase flow]
;; is this re-rendered?
[enter-recovery-phrase]]))

Test new reagent, see if this is re-rendered.

Is root subscriptions a good practice or should we now aim for in-place subscriptions?

Acceptance Criteria

GUIDELINES.md file

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

2 participants