zhangyuang / ssr

A most advanced ssr framework support React17/React18/Vue2/Vue3 on Earth that implemented serverless-side render specification.
http://doc.ssr-fc.com/
MIT License
2.61k stars 284 forks source link

feat: add location prop to StaticRouter #137

Closed Phecda closed 2 years ago

Phecda commented 2 years ago

This commit makes react router hooks (i.e., useLocation and useRouteMatch) valid in ssr mode.

Related doc: https://v5.reactrouter.com/web/api/StaticRouter/location-string