Enter a search term above to see results...
Enter a search term above to see results...
createComponent
is used to return the component instance. This is why createComponent is a function that returns an object.
We have now added a new method on our component dateSettings
, this is invoked directly from our template to return the settings object for the date.
The primary way callbacks interface with data in a component is through destructuring lifecycle callback arguments. There are many things you can access from callbacks, special flags like isServer
, isDarkMode
, the rendering el
, the state
, or settings
, or much more.
In our example we are now accessing settings
to pull the run-time settings for this instance of the component.
Underneath the hood settings
uses a ProxyObject
, so the value is always up to date without a get()
or value
accessor.