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

An issue with electron-webpack and @material-ui/pickers #17

Open
BurkovskyNikita opened this issue Jun 28, 2020 · 0 comments
Open

An issue with electron-webpack and @material-ui/pickers #17

BurkovskyNikita opened this issue Jun 28, 2020 · 0 comments

Comments

@BurkovskyNikita
Copy link

Hi,

So, this is my first time using both F# and electron. I may be missing something.

Basically, I took this repo as a base for my application, but had trouble setting up material-ui/pickers via Feliz.MaterialUI.Pickers bindings.

Just placing Mui.pickerUtilsProvider at the root of my application was giving me the following runtime error:

Uncaught Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:

  1. You might have mismatching versions of React and the renderer (such as React DOM)
  2. You might be breaking the Rules of Hooks
  3. You might have more than one copy of React in the same app

After a while, I found a solution in mobxjs/mobx-react-lite#248 (comment)
Adding module.exports = { externals: ['react', 'react-dom'], }; to the webpack.additions.renderer.js file solves the issue .

I thought it would be nice if somebody modified the webpack config and/or added examples for Feliz.MaterialUI.Pickers

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