From ee0356c492ee4b1f3ebe6b338e79d38021d7a794 Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Sat, 8 Oct 2016 17:50:09 -0700 Subject: [PATCH] Update Readme.md --- Readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index 66bbf326..d9dd3092 100644 --- a/Readme.md +++ b/Readme.md @@ -85,8 +85,8 @@ When state, lifecycle hooks or initial data population you can export a `React.C ```jsx import React from 'react' export default class extends React.Component { - static async getInitialProps ({ isServer, req }) { - return isServer + static async getInitialProps ({ req }) { + return req ? { userAgent: req.headers.userAgent } : { userAgent: navigator.userAgent } }