Skip to content

React 19 support with Typescript? #243

Answered by smagura-jm
gndelia asked this question in Q&A
Discussion options

You must be logged in to vote

This is the first time I've heard complaints of the library not working with React 19.

I tried this code with React 19 in a new Vite project:

import { SkeletonTheme } from "react-loading-skeleton";
import { PropsWithChildren } from "react";

interface MySkeletonThemeProps extends PropsWithChildren {}

function MySkeletonTheme({ children }: MySkeletonThemeProps) {
  return <SkeletonTheme>{children}</SkeletonTheme>;
}

function App() {
  return <MySkeletonTheme />;
}

It compiled without issue. Can you share a minimal repro of your issue?

Is it possible you have multiple versions of @types/react in your repo? This is a fairly common issue I have hit.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@gndelia
Comment options

@gndelia
Comment options

@gndelia
Comment options

@gndelia
Comment options

Answer selected by gndelia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants