bgreen
PD🧩 Plasmo Developers
•Created by bgreen on 8/15/2023 in #🔰newbie
When should you actually use getShadowHostId?
There are a few examples of getShadowHostId being used in the examples git repo.
In the example here for google, the sidebar no longer shows when I rename or remove the getShadowHostId line. (https://github.com/PlasmoHQ/examples/blob/main/with-content-scripts-ui/contents/google-sidebar.tsx#L20)
But in this example on the plasmo website, it still works perfectly whether I remove it or not, or rename it.
https://github.com/PlasmoHQ/examples/blob/main/with-content-scripts-ui/contents/plasmo-inline.tsx#L11
If getShadowHostId is mainly used to optimize unmount lookups, the why is it affecting the UI in the google example?
I still can't understand when I should use it or not. Thanks.
1 replies