You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 16, 2020. It is now read-only.
What is the prefered way to handle transparently or with minimal boilerplate immutable props in mercury? By props I mean an object that you provide to the render function of a descendant component, so you can affect it without touching its state from the owner. I can always use separate arguments, but I prefer an object, because usually there are more than one or two values and also I like to mimic the h() api. A not pretty way is to use a memoized function, with a single cache "slot", which will return the props object, based on some primitive arguments. That is ok for the descendant which will receive the object argument, but not even close to transparent for the owner component. By transparent I mean at the level of how we handle/embed state.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What is the prefered way to handle transparently or with minimal boilerplate immutable
props
in mercury? Byprops
I mean an object that you provide to the render function of a descendant component, so you can affect it without touching its state from the owner. I can always use separate arguments, but I prefer an object, because usually there are more than one or two values and also I like to mimic theh()
api. A not pretty way is to use a memoized function, with a single cache "slot", which will return the props object, based on some primitive arguments. That is ok for the descendant which will receive the object argument, but not even close to transparent for the owner component. By transparent I mean at the level of how we handle/embed state.The text was updated successfully, but these errors were encountered: