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
Context utility wish-list #241
Comments
|
I have been toying with the idea of computed properties which match the special props. There could even be special behaviors when reading/writing, if it makes sense. What would reading each computed property mean for each
|
Closing for housekeeping purposes. Going forward in 0.6, special props aren’t erased from component props, so you can just read them from there. |
Some context properties I wish I have when dogfooding, which would be relatively easy to implement:
this.hasRendered
Distinguish the initial run from subsequent runs in the render loop.this.isRefreshing
Distinguish between parent update and local update. Maybe it would be better to do this as an enumeration of render sources (this.refresh()
called, parent renders, root render?, provision/consumer renders?).this.renderer
Get an instance of the renderer so you can do checks for SSR or whatever.this.$key
Get the key passed to the component. I often have to pass the key around separately this for debugging purposes.this.$ref
Get the ref callback passed to a component. Could be used to override what is passed to the component.The text was updated successfully, but these errors were encountered: