MCPcopy Index your code
hub / github.com/reactjs/server-components-demo / sendResponse

Function sendResponse

server/api.server.js:103–114  ·  view source on GitHub ↗
(req, res, redirectToId)

Source from the content-addressed store, hash-verified

101}
102
103function sendResponse(req, res, redirectToId) {
104 const location = JSON.parse(req.query.location);
105 if (redirectToId) {
106 location.selectedId = redirectToId;
107 }
108 res.set('X-Location', JSON.stringify(location));
109 renderReactTree(res, {
110 selectedId: location.selectedId,
111 isEditing: location.isEditing,
112 searchText: location.searchText,
113 });
114}
115
116app.get('/react', function(req, res) {
117 sendResponse(req, res, null);

Callers 1

api.server.jsFile · 0.85

Calls 1

renderReactTreeFunction · 0.85

Tested by

no test coverage detected