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

Hydration error #50

Open
JeroenMoonen opened this issue Sep 21, 2023 · 1 comment
Open

Hydration error #50

JeroenMoonen opened this issue Sep 21, 2023 · 1 comment

Comments

@JeroenMoonen
Copy link

When navigating to a specific page using routerLink, everything goes well. When manually refreshing the page, I get an Hydration error. How do I solve this issue?

The error:
Screenshot 2023-09-21 at 09 52 07

The content of the page, where the Hydration error occurs:

import {
  IonBackButton,
  IonButton,
  IonButtons,
  IonContent,
  IonHeader,
  IonPage,
  IonTitle,
  IonToolbar,
} from '@ionic/react';
import React from 'react';

export default function Schedule(): React.JSX.Element {
  return (
    <>
      <IonPage>
        <IonHeader>
          <IonToolbar color="light">
            <IonButtons slot="start">
              <IonBackButton defaultHref="/"></IonBackButton>
            </IonButtons>
            <IonTitle>Schedule</IonTitle>
            <IonButtons slot="end">
              <IonButton routerLink="/booking/create">Create</IonButton>
            </IonButtons>
          </IonToolbar>
        </IonHeader>
        <IonContent className="ion-padding" color="light" role="feed">
          <h2>Lorem ipsum</h2>
          <p className="medium grey">Dolor sit amet.</p>
        </IonContent>
      </IonPage>
    </>
  );
}
@MDxWARRIORxOP
Copy link

Having the exact same error with ion-toolbar. Anyone find a solution yet?

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