-
Notifications
You must be signed in to change notification settings - Fork 1.4k
refactor: upgrade react 19 and react native 0.79 #3661
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Added `unstable_transformImportMeta` option to Babel preset for improved JSX handling. - Disabled `unstable_enablePackageExports` in Metro configuration for better package resolution. Signed-off-by: Innei <tukon479@gmail.com>
- Introduced a patch for `react-native-ios-utilities` to enhance functionality. - Updated `expo`, `react-native`, and `react-native-reanimated` versions in the example app for improved compatibility. - Added `react-native-ios-utilities` to the project dependencies in `package.json`. Signed-off-by: Innei <tukon479@gmail.com>
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Suggested PR Title:
Change Summary: Code Review: |
Linting and formatting issues were automatically fixed. Please review the changes. |
Linting and formatting issues were automatically fixed. Please review the changes. |
- Updated `useRouteParams` to utilize `useReadonlyRoute` for better state management. - Enhanced `useEntriesByView` to separate remote and local entry fetching, improving data handling and error management. - Introduced debouncing for pagination in local entries and added toast notifications for error handling. - Cleaned up entry ID retrieval to ensure uniqueness and prevent duplicates. Signed-off-by: Innei <tukon479@gmail.com>
- Updated the return statement in the Masonry component to use JSX syntax for better readability and consistency. Signed-off-by: Innei <tukon479@gmail.com>
- Changed the import statement in Sheet.tsx to reflect the updated context provider name for better clarity and consistency in the codebase. Signed-off-by: Innei <tukon479@gmail.com>
- Changed ref prop types from React.RefObject to React.Ref for better type compatibility across various components, enhancing overall code consistency and maintainability. Signed-off-by: Innei <tukon479@gmail.com>
…uration - Initialized the plugins array in the mobile app configuration to prevent potential runtime errors. - Updated TypeScript configuration to enhance module resolution and improve code organization with clearer path definitions. Signed-off-by: Innei <tukon479@gmail.com>
Signed-off-by: Innei <tukon479@gmail.com>
- Added `skipLibCheck` to TypeScript configuration for faster builds. - Updated prop types in various components to allow for null values in refs, enhancing type safety. - Refactored several components to ensure better type compatibility and maintainability. Signed-off-by: Innei <tukon479@gmail.com>
Signed-off-by: Innei <tukon479@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request upgrades the project to React 19 and React Native 0.79, refactoring context and forwardRef usages to accommodate new React APIs.
- Updated React hooks: replacing useContext with the new use hook and removing React.forwardRef where applicable.
- Modified context provider syntax to use the new provider API.
- Other minor improvements such as initializing refs with undefined.
Reviewed Changes
Copilot reviewed 240 out of 242 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
apps/desktop/layer/renderer/src/components/ui/markdown/renderers/*.tsx | Refactored context consumption from useContext to use, reflecting new React 19 syntax. |
apps/desktop/layer/renderer/src/components/ui/markdown/components/*.tsx | Adjusted usage of forwardRef for better ref type handling. |
apps/desktop/layer/renderer/src/components/ui/collapse/* | Updated context provider and hook usages; note potential naming inconsistency. |
apps/desktop/layer/renderer/src/components/ui/button/* | Initialized timers with undefined for clarity. |
.github/dependabot.yaml | Removed ignore list for React dependencies in light of the upgrade. |
Files not reviewed (2)
- apps/desktop/layer/main/package.json: Language not supported
- apps/desktop/layer/renderer/package.json: Language not supported
Comments suppressed due to low confidence (1)
apps/desktop/layer/renderer/src/components/ui/collapse/hooks.tsx:8
- The context variable 'CollaspeContext' appears to be misspelled compared to the error message 'CollapseContext not found'. Consider renaming it to 'CollapseContext' for consistency.
export const CollaspeContext = createContext<CollapseContextValue>(null!)
- Added console logs for debugging right and left widths. - Adjusted layout structure to ensure proper width handling for header elements. - Updated loading indicator positioning and visibility logic. Signed-off-by: Innei <tukon479@gmail.com>
- Refactored Pager and QRCode components to directly export as functional components with forwardRef. - Updated type definitions to improve ref handling and ensure better type safety. - Simplified component structure for improved readability and maintainability. Signed-off-by: Innei <tukon479@gmail.com>
…ure and improved type definitions - Converted FABBase and FABPortable to functional components using FC type for better type safety. - Updated props to include optional ref handling, enhancing flexibility in usage. - Simplified component structure for improved readability and maintainability. Signed-off-by: Innei <tukon479@gmail.com>
…cript configuration - Updated the patch for react-native-ios-utilities in pnpm-lock.yaml to reflect a new hash. - Enhanced TypeScript configuration in tsconfig.json by adding exclusion for node_modules and formatting paths for better readability. - Cleaned up the react-native-ios-utilities.patch by removing unused exports from the index file. Signed-off-by: Innei <tukon479@gmail.com>
No description provided.