react ssr如何把node中的变量传给react的component?

SSR的架构,react component需要判断req url,服务端渲染组件的时候怎么把node的req url告诉react的component?

阅读 1.6k
1 个回答
<StaticRouter location={url} context={{ url }}>

</StaticRouter>
推荐问题