Uncaught TypeError: Cannot set property ‘__h’ of null

  javascript, preact, react-dom, reactjs, webpack

I am getting this error, While using these aliases. Can you help me? Thanks!

Uncaught TypeError: Cannot set property '__h' of null
    at hooks.module.js:1
    at Array.forEach (<anonymous>)
    at x (hooks.module.js:1)
(anonymous) @   hooks.module.js:1
x   @   hooks.module.js:1

"preact": "^10.5.12"

Webpack alias code!

resolve: {
    alias: {
      "react": "preact/compat",
      "react-dom": "preact/compat"
    }
}

Source: Ask Javascript Questions

LEAVE A COMMENT