fullstory-babel-plugin-annotate-react icon indicating copy to clipboard operation
fullstory-babel-plugin-annotate-react copied to clipboard

Mobx observers don't get transformed

Open pnegahdar opened this issue 3 years ago • 1 comments

I raised this issue in the Mobx repo as well here: https://github.com/mobxjs/mobx/issues/3206

Components that are wrapped with their observer() hoc fail to be injected. Would this issue be with mobx or this plugin?

pnegahdar avatar Nov 30 '21 16:11 pnegahdar

Hi @pnegahdar - RC from FullStory's support team here. We're not really set up to provide support via Github issues. If you're running into an issue in a web app, can you reach out to [email protected] with details about any error you're running into? If it's a mobile app you can email [email protected] and we'll work with you there to figure out what's going on.

Thanks so much!

rcmaples avatar Dec 17 '21 20:12 rcmaples

Our annotate plugin currently does not support anonymous function components.

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

const HelloView = () => {
  return <div>hello</div>;
};

const ObserverView = observer(HelloView); // <-- this will be annotated;
const ObserverViewFAIL = observer(() => <div>hello</div>); // <-- this will not be annotated;

If this does not apply to your situation, please reopen this issue with an example of your use case. Thanks!

RyanCommits avatar Jul 25 '24 21:07 RyanCommits