How to embed ember code into a react applciation

I am trying to migrate an existing ember application app to react. What’s the best way of doing this?

I am fairly new to both ember and react, from what I have found on GitHub and other discussion threads is to use ember-cli-embedded but I can’t seem to get it working.

Some advice would be great.


What’s important to remember is that ember is an entire framework, and react is just the rendering layer. So ember is providing you with routing, state, ui, data, fetching, etc… And “react” does not provide all of those things. So you cannot just “use ember inside react;” that’s a nonsensical statement.

What’s also very likely is that your architecture and data flows are not the same that they are required to be in react, unless the existing application has been extensively refactored to use only “data-down-actions-up” and no two-way bindings.

What you may want to look into is embedding react in ember, and gradually moving routes into the react layer as you refactor them (and all templates/components they use!) for compatibility. I successfully embedded a react layer in an ember 3.28 application using this PR, subject to the caveat I posted in that thread.

Once you’ve migrated everything into the react layer, you can unwrap it and ditch the ember shell.