简体   繁体   中英

Is it possible to use ReactJS server rendering with data sent from the client?

I am getting data on the client side via websockets and laying it out via js. I want to add button to create pdf (using SelectPDF C#.NET). The data for the pdf is the same as on the page, yet the layout is completely different. I would like to send the data to the server side (eg ajax with my data structure) and create layout on the server side, render it and then pass to server side SelectPDF for pdf creation.

1) Is it possible to send data from client side to ReactJS.NET to create the layout on the server side?

2) If not ReactJS, what would you recommend to use for server side rendering and then sending the rendered file to SelectPDF?

Thank you

If you want to render react content from your server, you have to be sure your production enviroment has internet access (not recommended) to take cdn reference to Reactjs libraries or keep that libraries local.

High level diagram

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM