Open avalanche1 opened 6 years ago
Well this is a bit under-the-hood. The examples you link show how to import a component. They don't tell you why you have to import like that though. Maybe it is not the same way to import components in a pure React component.
What I would recommend instead is to provide an example with a mix of pure React and VM React component in a sample starter app (showing 2 similar components) as to show the difference and how to mix them in the VM app.
Maybe this can get referenced in the doc somehow after ?
(I basically took a long time to understand how to mix them, because of the import madness)
It took me some time to figure out that VM's DSL doesnt export react components as
default
. And thus you have to use curly braces whenimporting
your components. It would be nice to have a mention in https://viewmodel.org/#BasicsComponents