How would you rewrite an application from React to Ember?


#1

Hi,

Currently having a quite big React application, how would you progressively rewrite it into an Ember app ? Ideally we would like not to have to develop the new frontend for few months and then ship it once, but rather update the app progressively and get rid of all react code over multiple iterations.

Has anyone done that yet ? What are your suggestions ?

Bertho


#2

Hey @dynamiccast, regarding your question about how to rewrite into Ember … (not sure if you still need help here)

There are a few possibilities to how you can do this type of rewrite:

  • build small components in Ember (on one of your complex pages)
  • switch one page at a time into Ember
  • have Ember wrap your React app and slowly swallow it from the top down

I’ve been meaning to write an ebook on this topic (as I find it quite interesting) but haven’t had a chance to yet.


#3

Hi @acorncom !

Thank you for your anwser. I would love to read such a ebook.


#4

@dynamiccast If the react app is built with redux you could look at porting it to ember with help from ember-redux. I’ve designed the connect api to mirror that of react-redux meaning you should be able to “port/rewrite” the components from react => ember and copy the reducers/middleware/enchancers directories (with literally no modification).

If you have a special createStore setup you will find ember-redux is extensible. Also most everything you would “bolt on” from the react ecosystem exists in the ember ecosystem including …

redux saga

redux observable

reselect

normalizr

redux persist

redux offline

For a full blown example using ember, redux, typescript checkout the guides

http://www.ember-redux.com/typescript/


#5

Might as well add, there’s even Glimmer-redux now too


#6

@sivakumar_k wrote this little guide too: https://medium.com/front-end-hacking/using-react-components-in-your-ember-app-8f7805d409b0