Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React v16.7.0-alpha, hooks #23

Open
ezekielchentnik opened this issue Nov 29, 2018 · 5 comments
Open

React v16.7.0-alpha, hooks #23

ezekielchentnik opened this issue Nov 29, 2018 · 5 comments
Labels
question Further information is requested

Comments

@ezekielchentnik
Copy link

Something up with the latest react hooks stuff. I'm trying to narrow it down but no luck so far.

Error: Uncaught [TypeError: Cannot read property 'network' of null]

result = window.eval(output + '\nPRERENDER_RESULT');

@developit
Copy link
Collaborator

Seems like to be a syntax error. What version of Node are you running?

@developit developit added the question Further information is requested label Dec 3, 2018
@ezekielchentnik
Copy link
Author

node 11.3.0

@ezekielchentnik
Copy link
Author

ezekielchentnik commented Dec 3, 2018

My prerender entry is running regular react-dom render. Hooks are not yet support for 'react-dom/server' e.g. 'renderToString'

const prerender = ({ url = "/", title = "Studio" }: Props) => {

  // setup stuff ...
  
  // during dev we don't prerender
  return process.env.NODE_ENV === "development"
    ? ""
    : render(
        <Provider value={provide}>
          <App />
        </Provider>,
         window.document.getElementById("root")
      );
};

export default prerender;

@developit
Copy link
Collaborator

Did you ever find the root cause for this? There isn't really anything in prerender-loader that seems like it would cause this. Maybe it's an issue with React 16.7 + JSDOM?

@edwardfxiao
Copy link

I'm using 16.8.0-alpha.0 and hooks, does not seem any weirdness yet. Everything works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants