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

Not working on starter NextJS app #11

Closed
dijs opened this issue Feb 5, 2020 · 1 comment
Closed

Not working on starter NextJS app #11

dijs opened this issue Feb 5, 2020 · 1 comment

Comments

@dijs
Copy link

dijs commented Feb 5, 2020

I have tried to use this wrapper component as shown in the README.

But I am not experiencing any difference of functionality, am I missing something?

I expected ssrOnly to render a component with zero functionality. But it is being rendered full and interactive.

I have also tried the other events and am seeing no difference.

Example code:

import LazyHydrate from 'react-lazy-hydration'

export default function Test() {
  return (
    <div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center' }}>
      Hello Test!
      <LazyHydrate ssrOnly>
        <div
          style={{ background: 'red', width: 300, height: 300 }}
          onClick={() => console.log('clicked')}
        >
          Click Me
        </div>
      </LazyHydrate>
    </div>
  )
}

I am seeing clicked in the console with this code after clicking.

@dijs
Copy link
Author

dijs commented Feb 6, 2020

Turn's out we are rendering with Preact, which is apparently not supported.

@hadeeb hadeeb closed this as completed Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants