Skip to content

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

Merged
merged 25 commits into from
May 7, 2025
Merged

refactor: upgrade react 19 and react native 0.79 #3661

merged 25 commits into from
May 7, 2025

Conversation

Innei
Copy link
Member

@Innei Innei commented May 6, 2025

No description provided.

Innei added 3 commits May 2, 2025 01:54
Signed-off-by: Innei <tukon479@gmail.com>
- 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>
Copy link

vercel bot commented May 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
follow ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 7, 2025 8:09am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
follow-external-ssr ⬜️ Ignored (Inspect) Visit Preview May 7, 2025 8:09am

@follow-reviewer-bot
Copy link

Suggested PR Title:

feat(mobile): add iOS native project and update dependencies

Change Summary:
This PR introduces the native iOS project setup for the mobile app (including Xcode project files, plist configurations, assets, Podfile, and bridging code) enabling iOS builds and native module support. It also updates various dependencies to newer versions (notably React 19, react-native 0.79.1, and Expo 53) in mobile and desktop packages for improved compatibility and features. The .gitignore and Metro config are adjusted for the new structure. Redundant or incompatible app config settings (e.g., old plugins, app-check) are cleaned up. This evolves the mobile app towards supporting native development and modern dependencies, unblocking further iOS-specific work.

Code Review:
No change requests necessary.

Copy link

github-actions bot commented May 6, 2025

Linting and formatting issues were automatically fixed. Please review the changes.

Signed-off-by: Innei <tukon479@gmail.com>
Copy link

github-actions bot commented May 6, 2025

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>
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>
Innei added 2 commits May 6, 2025 22:39
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>
@Innei Innei requested a review from Copilot May 6, 2025 15:54
Copy link

@Copilot Copilot AI left a 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>
Innei added 2 commits May 7, 2025 00:58
- 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>
Signed-off-by: Innei <tukon479@gmail.com>
@Innei Innei merged commit efc2e97 into dev May 7, 2025
10 checks passed
@Innei Innei deleted the rn79 branch May 7, 2025 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant