inEditor always returns false

hey Plasmic team,
i’m trying to use the inEditor property of PlasmicCanvasContext but it always returns false while rendering in the Studio

i’m pulling it from:
import {PlasmicCanvasContext} from '@plasmicapp/react-web/lib/host';

and using it in our _app.jsx component like this:
const inEditor *=* useContext(PlasmicCanvasContext);

using version 0.2.190 of @plasmicapp/react-web

thanks for the help!

ah, from _app you wouldn’t see the canvas context, as it sits above the <PlasmicCanvasHost/> which provides that context.

unfortunately you’ll have to resort to uglier checks, like seeing if window.location.href contains /plasmic-host etc :confused:

thanks for the quick response Chung! yeah that makes sense :+1: