I have a warnings and errors with adding Countdown Date in my app. Can someone help me?

33 Views Asked by At

After using Countdown in my project to set the time on the menu, I got errors and warnings called: Warning: Text content did not match. Server: "42" Client: "40", Warning: An error occurred during hydration. The server HTML was replaced with client content in <#document>., Uncaught Error: Text content does not match server-rendered HTML. and react-dom.development.js:16451 Uncaught Error: There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering.

Does anyone know how to solve this? I am doing the project according to the Tutorial and here is the source code (on my side) Thank you very much for anyone who takes the time for me and I am giving the source code below if you want to se the full source code, here is it text

import React from 'react'
import Countdown from 'react-countdown'

const endingDate = new Date("2023-11-30")

const CountDown = () => {
  return (
    <div>
      <Countdown className='font-bold text-5xl text-yellow-300' date={endingDate} />
    </div>
  )
}

export default CountDown

I tried to install Countdown again in different ways, but they didn't help either, and it throws the same thing, for example copying it from the source code, if I didn't do something wrong somewhere, but not like that.

0

There are 0 best solutions below