我正在使用React和Express . 我正在进行服务器端渲染,用于我的任何路由的第一次加载 . 此路由类似于“/ contacts”,“/ aboutUs”等 . 现在我正在使用Axis执行API POST和GET请求并点击“/ api / contactForm”之类的 endpoints 当有人在浏览器中访问此路由时,那里什么都没有 . 是否有可能或实际上是否需要从此API提供的响应中进行SSR?

例如,我访问“http://mydomain/contacts " page and that page is server side rendered. On that page there is button, and when it's clicked it uses Axios to make GET request for some data in Express on a route " / api / myData ". I return the fetched data to client and show it on " http://mydomain/contacts”页面 .

可以返回的数据是服务器端呈现的(SSR) . 我不知道有什么好处,但要问以防万一?