-
Notifications
You must be signed in to change notification settings - Fork 327
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
Allow component JavaScript constructor to take a config object #2698
Comments
Would we want to add a config object to every component upfront (so that the interface exists, even if it's not being used yet), or only to the components as-and-when they have a reason to need it? |
Does this also include being able to pass config via |
@36degrees I think I imagined it all being part of this story... I don't think the work would be too big to do in one, but if it turned out that way we could split it up. I'll expand the "Done when" section a bit at least to make it clear it's intended to include both |
Based on this discussion, I think we've agreed that config will be passed to the constructor rather than the init function, which also matches the example in the proposal. |
What
Allow components to take a config object through their constructor, before being initialised. The config object should default to an empty object, and therefore a component must be able to continue working even if the config object is empty (e.g: by setting some defaults to fall back on).
Why
To allow for options to be passed to our component JavaScript in future, e.g: translations
Who needs to work on this
Developers
Who needs to review this
Developers
Done when
init()
andinitAll()
The text was updated successfully, but these errors were encountered: