D
D
Dima2020-11-02 11:51:09
React
Dima, 2020-11-02 11:51:09

How to gradually migrate a large project to React?

There is a large project written in Knockout + Ruby. The client wants to gradually rewrite it to React + Ruby. I didn't find anything on the Internet, except for a few small articles on how to add a couple of components to a page. In a real application, there is routing, redux, redux-saga, typescript, and more. Has anyone faced a similar issue?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dima, 2020-11-26
@dimakrsna

Afanasy Zakharov Due to the peculiarities of the project, I had to do it differently. We hung all the react application on a separate path that is written in the ruby ​​code. The inconvenience of this approach is that every time you need to show updates, you need to build react and manually update the links in the ruby ​​file. Surely there is some kind of automation option, but I'm not familiar with it. But on the other hand, this is a trifle compared to understanding the intricacies of the legacy framework or rewriting under react on rails or something like that.

A
Afanasy Zakharov, 2020-11-02
@afanasiyz

As far as I remember, Knockout is a little, but it is similar to React.
IMHO, here are the steps:
1. Look at the pages as a whole. select the simplest of them.
2. on the back side, prepare the return of two options for static, the old one with a knockout, and the new one with a react, using different url prefixes.
3. Drag and drop independent pages, starting with the simplest ones, onto React (any common components used, such as a header or footers, will need to be implemented again in React).
4. during the drag and drop process, figure out if you need reduxes, typescripts, and so on.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question