Helpful Migration Guides:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export default class Article extends Component { | |
| // notice that it's an async function | |
| static async getInitialProps () { | |
| // fetch data on the server and parse it to JSON | |
| const res = await | |
| fetch('http://localhost:3000/wp-json/wp/v2/articles/1316999'); | |
| const json = await res.json(); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer