Skip to content

Warning: Component "ReactCountdownClock" contains the string ref "component". #83

Description

@KonradHoeffner

When I use this component, I get the following errors/warnings in the developer console:

Warning: Component "ReactCountdownClock" contains the string ref "component". Support for string refs will be removed in a future major release. We recommend using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref
ReactCountdownClock
div
header
div
Quiz@http://localhost:5173/src/components/Quiz.jsx?t=1728293030557:21:14
QuizApp@http://localhost:5173/src/components/QuizApp.jsx:10:1 [react-dom.development.js:86:29](http://localhost:5173/node_modules/react-dom/cjs/react-dom.development.js)
Warning: Component "div" contains the string ref "background". Support for string refs will be removed in a future major release. We recommend using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref
div
ReactCountdownClock
div
header
div
Quiz@http://localhost:5173/src/components/Quiz.jsx?t=1728293030557:21:14
QuizApp@http://localhost:5173/src/components/QuizApp.jsx:10:1

It is included as follows:

   <div>
          {config.QUESTION_SECONDS > 0 && (
        <ReactCountdownClock seconds={config.QUESTION_SECONDS} key={state.clockCompletions} color="#000" alpha={0.9} size={180} />
      )}
    </div>

I am using the newest versions of all dependencies:

"@vitejs/plugin-legacy": "^5.4.2",
"@vitejs/plugin-react": "^4.3.2",
"prop-types": "^15.8.1",
"react": "^18.3.1",
"react-countdown-clock": "^2.11.0",
"react-dom": "^18.3.1",
"vite": "^5.4.8"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions