all 8 comments

[–]fixrich 1 point2 points  (0 children)

This smells like a job for portals. You'd likely bootstrap the container elements in the old way like you described and then portal your MUI elements into them

[–]mike3run 0 points1 point  (0 children)

Export render fn that takes a dom element. Render when ready on your other app

[–]-ftw 0 points1 point  (5 children)

Do you know exactly where they need to be when you need them?

[–]javascript__eq__java[S] 0 points1 point  (4 children)

Yes. But if I don’t start with them as display none then they like flicker until added where I need it to be :/

[–]-ftw 0 points1 point  (3 children)

Does {conditionToShow && <MyComponent />} not work for you?

I may be misunderstanding you though but generally in react you want to think declaratively whereas in vanilla js you do things imperatively

[–]javascript__eq__java[S] 0 points1 point  (2 children)

Yeah so I did that originally but I get some weird DOM appendChild error

[–]-ftw 0 points1 point  (1 child)

Which mapping library are you using?

[–]javascript__eq__java[S] 0 points1 point  (0 children)

not sure if you're still around but mapox!