Skip to content
This repository has been archived by the owner on Dec 31, 2020. It is now read-only.

Cannot read property 'prototype' of undefined when import useObserver #796

Closed
Ridermansb opened this issue Nov 9, 2019 · 2 comments
Closed
Labels

Comments

@Ridermansb
Copy link

When I import useObserver I'm getting this error:

image

I tried both way ...

import { useObserver } from "mobx-react-lite";

or

import { useObserver } from "mobx-react";

Full example here:
https://codesandbox.io/s/example-preact-mobx-state-tree-with-hooks-yk7o2

@danielkcz
Copy link
Contributor

Um, based on error stack it's preact-compat library related issue, so please ask there.

I know there was some rumor, that mobx-preact is no longer needed and mobx-react should used instead, but I don't believe it's true ... mobxjs/mobx-preact#18

@lock
Copy link

lock bot commented Jan 14, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or questions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants