-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
Description
When I receive a printed call stack from React, the components wrapped in observer show up as observerComponent
at observerComponent (http://localhost:3000/static/js/bundle.js:119423:69)
at div
at observerComponent (http://localhost:3000/static/js/bundle.js:119423:69)
at PrimaryWindow (http://localhost:3000/static/js/bundle.js:4346:5)
and in the callstack in the debugger shows up as anonymous
<anonymous> (/Users/johntwigg/development/crypto/loopNFT/ui/src/components/Cinema/CinemaMain.tsx:35)
<anonymous> (/Users/johntwigg/development/crypto/loopNFT/ui/node_modules/mobx-react-lite/src/observer.ts:104)
<anonymous> (/Users/johntwigg/development/crypto/loopNFT/ui/node_modules/mobx-react-lite/src/useObserver.ts:115)
Intended outcome:
Ideally, the underlying React Name would be maintained. CinemaMain in this case.
Actual outcome:
anonymous and observerComponent
Looking at issue #3422 doesn't seem to resolve or change the behavior for me.
For example
const FocusLane : React.FC = observer(() => {...})
FocusLane.displayName = "FocusLane"
has no impact.
Any ideas? I'm open to workarounds.
Versions
➜ ui git:(mobx) ✗ npm list --depth 2 | grep mobx
├─┬ mobx-react-lite@3.4.0
│ ├── mobx@6.6.1
Reactions are currently unavailable