-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Updating @flatfile/react for React 19 Support
Overview
This document outlines the steps required to update the @flatfile/react package to support React 19 while maintaining backwards compatibility where possible.
Current State
- Current React support: ^16.0.0 || ^17.0.0 || ^18.0.0
- Build system: Rollup + TypeScript
- Testing: Jest with React Testing Library
Required Changes
1. Package.json Updates
{
"peerDependencies": {
"react": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
},
"devDependencies": {
"@types/react": ">=16.9.0 <20.0.0",
"@types/react-dom": ">=16.9.0 <20.0.0"
}
}2. TypeScript Configuration
- Review and update tsconfig.json if needed for React 19 JSX transformations
- Ensure JSX runtime compatibility
3. Testing Updates
- Update testing-library/react to latest version
- Review and update test configurations for React 19 compatibility
4. Code Review Areas
Key areas to review for React 19 compatibility:
-
useEffect and useLayoutEffect usage in:
- FlatfileProvider.tsx
- useFlatfile.ts
- Other hooks
-
Event handling in:
- EmbeddedIFrameWrapper
- Space components
- Event listeners
-
React.FC usage and component types
-
Test to determine others
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels