cypress-svelte-unit-test icon indicating copy to clipboard operation
cypress-svelte-unit-test copied to clipboard

Support all options of component ctor

Open dschulten opened this issue 7 years ago • 1 comments

Bug: The component constructor can take several options, not just data: currently there is data, store and slots, and potentially there will be more. The fact that the second parameter to mount() is used as data rather than as the options might be considered a bug, because it does not match the component ctor, it makes it difficult to support the current options and to add more options in the future. Suggestion: change the mount(Component, data) api to mount(Component, options) and let options have data, store and slots etc. attributes.

dschulten avatar Feb 18 '18 17:02 dschulten

Great idea

Sent from my iPhone

On Feb 18, 2018, at 12:10, Dietrich Schulten [email protected] wrote:

Bug: The component constructor can take several options, not just data: currently there is data, store and slots, and potentially there will be more. The fact that the second parameter is used as data rather than as the options might be considered a bug, because it makes it difficult to add more options in the future. Suggestion: change the mount(Component, data) api to mount(Component, options) and let options have data, store and slots etc. attributes.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

bahmutov avatar Feb 18 '18 19:02 bahmutov