Hi, when I try that, it doesn’t seem to substitute. my states aren’t being passed
Hmm what do you mean by your states?
when i pass the props down like backEnabled to the Hud component, it’s not being recognized
basically my Hud.tsx isn’t being used, it’s using plasmic’s Hud
hmm that’s surprising; from the render method of the Hud
component, you don’t see any props being passed in?
right! i would have a console.log() statement in the Hud component not being printed at all in console.
none of the Hud.tsx is being used
Can you show the import path for your Hud component from the Login component?
import Hud from ‘…/components/Hud’
Could you try this instead:
hub: {
render: () => <Hub backEnabled={false} />
}
hi that works, but when i try on a different component, the layout is corrupted
triviaPanel: {
render: () => <TriviaPanel />
}
it works with the Hud component because the position values aren’t sent aways (it’s always overlaid on the entire UI)
ah can you try it this way instead:
triviaPanel: {
render: (ps) => <TriviaPanel {...ps} />
}
This just passes the props onto TriviaPanel
(which includes className
, which points to css rules that position the instance)
For Hub
, you would just do…
hub: {
render: (ps) => <Hub {...ps} backEnabled={false} />
}
ah got it. thanks this works!
actually i spoke too soon, it seems to not work