Skip to content
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

data in main component #11

Closed
Milesq opened this issue Mar 30, 2019 · 2 comments
Closed

data in main component #11

Milesq opened this issue Mar 30, 2019 · 2 comments

Comments

@Milesq
Copy link

Milesq commented Mar 30, 2019

import Mosaic from '@authman2/mosaic';

const app = new Mosaic({
   element: '#app',
   data: {
      foo: 'ok'
   },
   view: (data) => {
      return html`<div>${ data.foo }</div>`;
   }
});

app.paint();

this code should display 'ok', right? He does not do this

@Authman2
Copy link
Owner

What does the html file look like? It should have an element with the id "app" otherwise it will not know where to put the component.

@Milesq
Copy link
Author

Milesq commented Mar 30, 2019

Element #app exists. I had an old version of Mosaic. I've installed @authman2/mosaic@latest and it works;). Great freamwork, I was afraid that it will be a bit unstable but for smaller projects it is perfect!

@Milesq Milesq closed this as completed Mar 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants