We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
页面获取controller数据使用http,还是?
The text was updated successfully, but these errors were encountered:
构造store注入到html内联script里或者提供http接口异步获取
Sorry, something went wrong.
controller:
const renderData = { tplData, ssrVo: { daily, refList, wxData }, }; await ctx.ssr('/server/contentDaily/index.jsx', renderData);
index.jsx:
static async getStore({ ssrVo }) { const initState = { ...initialAppState, contentDaily: ssrVo, }; return configureStore(initState); }
layout.jsx
<script dangerouslySetInnerHTML={{ __html: `window.__INITIAL_STATE__ = ${state};window.__path__="${path}";`, }} />
或者不用redux也ok。
No branches or pull requests
页面获取controller数据使用http,还是?
The text was updated successfully, but these errors were encountered: