From 9aa1d50793d81065e22835e9d693b4b4d5645fb2 Mon Sep 17 00:00:00 2001 From: Alicia Lopez Date: Wed, 27 Nov 2019 17:43:02 +0800 Subject: [PATCH] Fix 'SSR with Next.js' code error (#152) the issue: https://github.com/zeit/swr/issues/151 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ad7ea49..8ad427b 100644 --- a/README.md +++ b/README.md @@ -356,7 +356,7 @@ With the `initialData` option, you pass an initial value to the hook. It works p such as `getInitialProps` in [Next.js](https://github.com/zeit/next.js): ```js -App.getInitialProps = async getInitialProps () { +App.getInitialProps = async () => { const data = await fetcher('/api/data') return { data } }