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

issue mounting rootApp #5293

Open
dberardo-com opened this issue Dec 2, 2024 · 1 comment
Open

issue mounting rootApp #5293

dberardo-com opened this issue Dec 2, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@dberardo-com
Copy link

dberardo-com commented Dec 2, 2024

in v18 i am trying to mount the owl component using the "rootApp" strategy shown in the main.js file of the demo folder.

here the relevant code:

 const rootApp = new owl.App(Spreadsheet, { props: { model } });
 rootApp.addTemplates(templates);
 rootApp.mount(document.body, {});

here the error i get:

No active component (a hook function should only be called in 'setup')

i have tried to move the 2 hooks "useRef("spreadsheet");" and "useSpreadsheetRect();" in Spreadsheet component inside the setup() function but still get this error.

this same code use to work in v16 ...

Notice that everything works fine in development mode, but does not in the build version ... any hint this might be ?

@VincentSchippefilt
Copy link
Collaborator

Hello,
Could you share your main file ? We managed to make ours work, so it's likely a small configuration issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants