【发布时间】:2019-11-07 03:44:32
【问题描述】:
这里是新手,
我从this 学习的代码和 我还发现几乎每个 _app.js 也有这行代码。
class Name extends App {
render() {
const { Component, pageProps } = this.props;
const config = { some config here };
return (
<AppProvider config = { config }>
<Component {...pageProps} />
</AppProvider>
);
}
}
我知道<Component {...pageProps} /> 部分代表所有其他页面。当我浏览页面时,它会在 pageprops 中发生变化。
只是我不知道它如何调用其他页面?
【问题讨论】:
标签: reactjs state shopify next.js react-component