Using react as the front end, PHP is responsible for obtaining data. Both are passed by Ajax to pass the data.
This way, after rendering the page, the user's subsequent actions are possible.
However, if the first render page is loaded with Ajax, it feels a bit slower.
Is there any good way to solve it?
Reply content:
Using react as the front end, PHP is responsible for obtaining data. Both are passed by Ajax to pass the data.
This way, after rendering the page, the user's subsequent actions are possible.
However, if the first render page is loaded with Ajax, it feels a bit slower.
Is there any good way to solve it?
Do a loading on the line, or HTML let PHP output to the same time, the data is also output to the page variables, so that the first page eliminates the Ajax loaded into the
Front:
Is it useful to use react's family barrels? What Webpack pack or something like that?
If it's because of the picture, see if it can be lazy loading
Back end:
Without the front end, it takes a lot of time to test the simple Ajax load with the Chrome app postman. If so, look at the server's ping value, database SQL statements and design there is no place to optimize
Between front-end and back-end:
Use relay and GRAPHQL to resolve. It's a lot more work, Facebook's open source project, and they're using it.
The most lazy way:
Add a splash screen (similar to when you just opened the phone app to see the logo in the center of the transition picture), or data loading tips (Loading ... )