How to use react or vue partial refactoring for front-end and back-end unseparated projects

at present, the old system is not separated from the front and rear of python, but now it is intended to be reconstructed with react, but the period is long, so on the new task or part of react refactoring, there is a problem, that is, how to share the react refactoring part with the unseparated part of the front and back end, and how to load the react part during deployment and the first visit? How can it be solved?

Jan.26,2022

if you want to do partial refactoring and need no connection between the old and the new, use the node and koa2 framework to build a front-end service, use node to manage your static resources, and route


has recently been working on the React refactoring jQuery project, which I would like to share with you.

1. Use < div id= "rebuild_id" > < / div > to stay where you need refactoring in the old project.
2. Completely use the React project to do that part of the refactoring. At this point, you need to know what parameters need to be passed to the react refactored part from the old part, and what the React section needs to return to the old code. The
parameter and the returned content are handled in index.js . When developing, you can write a mock data.
similar:

export function startup(containerId, inport, outport) {
    ReactDOM.render(<App {...inport} callback={data => outport(data)} />, document.getElementById(containerId));
}

5, packaged, packaged React project, which can be introduced in the old project. It depends on how the old project was introduced.
6. After it is introduced in the old project, just startup (.) is fine.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1be58b5-3177e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1be58b5-3177e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?