import React from 'react' import Link from 'next/link' import 'isomorphic-unfetch' export default class MyPage extends React.Component { static async getInitialProps () { // eslint-disable-next-line no-undef const res = await fetch('https://api.github.com/repos/developit/preact') const json = await res.json() return { stars: json.stargazers_count } } render () { return (

Preact has {this.props.stars} ⭐️

I bet next has more stars (?)
) } }