Skip to content

Commit

Permalink
feat(react): upgrade to React v19
Browse files Browse the repository at this point in the history
  • Loading branch information
theashraf committed Dec 12, 2024
1 parent 0a985a0 commit 87cea8e
Show file tree
Hide file tree
Showing 7 changed files with 1,121 additions and 543 deletions.
5 changes: 5 additions & 0 deletions .changeset/neat-turtles-sip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@lottiefiles/dotlottie-react': minor
---

feat: React v19 upgrade
8 changes: 4 additions & 4 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@
"type-check": "tsc --noEmit"
},
"peerDependencies": {
"react": "^17 || ^18"
"react": "^17 || ^18 || ^19"
},
"dependencies": {
"@lottiefiles/dotlottie-web": "workspace:*"
},
"devDependencies": {
"@types/react": "^18.2.37",
"@types/react": "^19.0.1",
"cross-env": "7.0.3",
"react": "^18.2.0",
"tsup": "8.0.1",
"react": "^19.0.0",
"tsup": "8.3.5",
"typescript": "5.0.4"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/dotlottie-worker.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import type { DotLottieWorker, Config } from '@lottiefiles/dotlottie-web';
import { useEffect, type ComponentProps, type RefCallback } from 'react';
import { useEffect, type ComponentProps, type RefCallback, type JSX } from 'react';

import { useDotLottieWorker } from './use-dotlottie-worker';
import useStableCallback from './use-stable-callback';
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/dotlottie.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import type { DotLottie, Config } from '@lottiefiles/dotlottie-web';
import { useEffect, type ComponentProps, type RefCallback } from 'react';
import { useEffect, type ComponentProps, type RefCallback, type JSX } from 'react';

import { useDotLottie } from './use-dotlottie';
import useStableCallback from './use-stable-callback';
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/use-dotlottie-worker.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Config } from '@lottiefiles/dotlottie-web';
import { DotLottieWorker } from '@lottiefiles/dotlottie-web';
import { useCallback, useState, useEffect, useRef } from 'react';
import { useCallback, useState, useEffect, useRef, type JSX } from 'react';
import type { ComponentProps, RefCallback } from 'react';

interface DotLottieWorkerComponentProps {
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/use-dotlottie.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Config } from '@lottiefiles/dotlottie-web';
import { DotLottie } from '@lottiefiles/dotlottie-web';
import { useCallback, useState, useEffect, useRef } from 'react';
import { useCallback, useState, useEffect, useRef, type JSX } from 'react';
import type { ComponentProps, RefCallback } from 'react';

interface DotLottieComponentProps {
Expand Down
Loading

0 comments on commit 87cea8e

Please sign in to comment.