{
_photos.map((photo, index) => (
))
}
)
}
export const Page = Home;
```
---
#### SSR模式
```javascript
export {
Page as default,
getPrerenderProps as getServerSideProps
} from '../modules/Home';
```
---
#### SSG模式
```javascript
export {
Page as default,
getPrerenderProps as getStaticProps
} from '../modules/Home';
```
---
#### CSR模式
```javascript
import {Page, getPrerenderProps} from '../modules/Home';
import {useEffect, useState} from 'react';
import { useRouter } from 'next/router'
const CSR = () => {
const router = useRouter();
const [extraProps, setExtraProps] = useState({});
useEffect(() => {
getPrerenderProps(router).then(({props}) => {
setExtraProps(props);
})
}, [router]);
return