Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyuang committed Mar 25, 2024
1 parent 3ca64cd commit 863c923
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 4 deletions.
9 changes: 9 additions & 0 deletions packages/plugin-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## [6.2.75](https://github.com/zhangyuang/ssr/compare/[email protected]@6.2.75) (2024-03-25)


### Bug Fixes

* contex single instance ([3ca64cd](https://github.com/zhangyuang/ssr/commit/3ca64cdcd6aa0e556b5131147737b39bcd50902f))



## [6.2.74](https://github.com/zhangyuang/ssr/compare/[email protected]@6.2.74) (2024-03-25)


Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ssr-plugin-react",
"version": "6.2.74",
"version": "6.2.75",
"description": "plugin-react for ssr",
"main": "./cjs/index.js",
"module": "./esm/index.js",
Expand Down
9 changes: 9 additions & 0 deletions packages/plugin-react18/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## [6.2.75](https://github.com/zhangyuang/ssr/compare/[email protected]@6.2.75) (2024-03-25)


### Bug Fixes

* contex single instance ([3ca64cd](https://github.com/zhangyuang/ssr/commit/3ca64cdcd6aa0e556b5131147737b39bcd50902f))



## [6.2.74](https://github.com/zhangyuang/ssr/compare/[email protected]@6.2.74) (2024-03-25)


Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-react18/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ssr-plugin-react18",
"version": "6.2.74",
"version": "6.2.75",
"description": "plugin-react18 for ssr",
"main": "./cjs/index.js",
"module": "./esm/index.js",
Expand Down
4 changes: 3 additions & 1 deletion packages/plugin-react18/src/entry/client-entry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ const clientRender = async (): Promise<void> => {
const IApp = App ?? function(props: LayoutProps) {
return props.children!
}
setStoreContext(ssrCreateContext() as any)
const context = ssrCreateContext() as any
setStoreContext(context)
const store = createStore(window.__VALTIO_DATA__)
setStore(store ?? {})
const baseName = isMicro() ? window.clientPrefix : window.prefix
Expand All @@ -23,6 +24,7 @@ const clientRender = async (): Promise<void> => {
const ele = createElement(BrowserRouter as any, {
basename: baseName
}, createElement(AppContext as any, {
context,
children: createElement(Switch as any, null,
createElement(IApp as any, null, createElement(Switch as any, null,
routes.map(item => {
Expand Down
9 changes: 9 additions & 0 deletions packages/types/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## [6.2.55](https://github.com/zhangyuang/ssr/compare/[email protected]@6.2.55) (2024-03-25)


### Bug Fixes

* contex single instance ([3ca64cd](https://github.com/zhangyuang/ssr/commit/3ca64cdcd6aa0e556b5131147737b39bcd50902f))



## [6.2.54](https://github.com/zhangyuang/ssr/compare/[email protected]@6.2.54) (2024-03-25)


Expand Down
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ssr-types",
"version": "6.2.54",
"version": "6.2.55",
"description": "types for serverless ssr",
"main": "./cjs/index.js",
"module": "./esm/index.js",
Expand Down

0 comments on commit 863c923

Please sign in to comment.