score:2

Accepted answer
cont initialState = typeof window !== "undefined" && window && window.INITIAL_STATE;.

score:0

function Example() {
  const initialState =
    process.browser && window.INITIAL_STATE;

  return <div> { initialState } </div>
}

Related Query

More Query from same tag