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

Using next js 14 app router,When nodeIntegration set to true,the useEffect not trigger, #479

Open
imtiger opened this issue Jul 23, 2024 · 0 comments

Comments

@imtiger
Copy link

imtiger commented Jul 23, 2024

Hi ,I use next js 14 app router ,When I set nodeIntegration to true in the createWindow method like below ,the useEffect method not trigger.if nodeIntegration set to false ,the useEffect is executed ,everything is ok , but I want to know why?

const mainWindow = createWindow('main', {
        width: 1000,
        height: 600,
        webPreferences: {
            contextIsolation: false,
            nodeIntegration:true, // if this set to true ,useEffect not trigger
            preload: path.join(__dirname, 'preload.js'),
        },
    })

the project file structure is below
image
the layout core code is :
image
the ProviderComponent code is below:
image
the app code is below:
image
I find the app component's useEffect not trigger. and the console only print the App component--- ,not print :useEffect [] init

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

1 participant