8000 feat: upgrade to react 19 by arunjaindev · Pull Request #1016 · devtron-labs/devtron-fe-common-lib · GitHub
[go: up one dir, main page]

Skip to content

feat: upgrade to react 19#1016

Open
arunjaindev wants to merge 7 commits intofeat/react-18from
feat/react-19
Open

feat: upgrade to react 19#1016
arunjaindev wants to merge 7 commits intofeat/react-18from
feat/react-19

Conversation

@arunjaindev
Copy link
Contributor
  • Added ref prop to BulkSelectionProps for better ref management.
  • Refactored ButtonElement to remove forwardRef and handle refs directly.
  • Updated various components in the CICDHistory section to include type JSX imports for better type safety.
  • Improved ref initialization in CodeEditor and CodeEditorRenderer components.
  • Added global type definitions for JSX to maintain compatibility with third-party libraries.
  • Updated index.ts to enhance query and mutation metadata interfaces in react-query.

- Added `ref` prop to `BulkSelectionProps` for better ref management.
- Refactored `ButtonElement` to remove `forwardRef` and handle refs directly.
- Updated various components in the CICDHistory section to include `type JSX` imports for better type safety.
- Improved ref initialization in `CodeEditor` and `CodeEditorRenderer` components.
- Added global type definitions for JSX to maintain compatibility with third-party libraries.
- Updated `index.ts` to enhance query and mutation metadata interfaces in react-query.
Copy link
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 PR upgrades the library from React 18 to React 19 and TanStack Query v4 to v5, along with several other dependency updates. The changes include refactoring components to remove forwardRef usage in favor of direct ref prop handling, adding JSX type imports for React 19 compatibility, and implementing a global JSX namespace shim to maintain compatibility with third-party libraries.

Changes:

  • Upgraded React 18 → 19, TanStack Query v4 → v5, and several other dependencies (framer-motion, react-day-picker, etc.)
  • Removed forwardRef from Button, BulkSelection, Checkbox, and RJSFForm components in favor of direct ref prop handling
  • Added global JSX namespace shim in globals.d.ts to maintain compatibility with third-party libraries like react-select
  • Migrated TanStack Query type augmentation from QueryMeta/MutationMeta to Register interface pattern
  • Updated cacheTime to gcTime in TanStack Query configuration
  • Added type JSX imports across multiple files for React 19 type compatibility
  • Enabled navLayout="around" prop in DateTimePicker (previously commented out)
  • Initialized refs with null instead of undefined in multiple components

Reviewed changes

Copilot reviewed 54 out of 56 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
package.json & package-lock.json Upgraded React to 19.2.4, TanStack Query to 5.90.21, framer-motion to 11.18.2, react-day-picker to 9.11.2, and other dependencies
src/globals.d.ts New file adding JSX namespace shim for React 19 compatibility with third-party libraries
src/index.ts Migrated TanStack Query type augmentation to use Register interface pattern
src/Shared/Components/Button/Button.component.tsx Removed forwardRef, implemented direct ref handling with callback
src/Shared/Components/BulkSelection/BulkSelection.tsx Removed forwardRef, added ref prop to interface
src/Common/Checkbox/Checkbox.tsx Removed forwardRef, added ref prop handling
src/Common/RJSF/Form.tsx Removed forwardRef, ref now passed directly to underlying Form component
src/Common/Types.ts Replaced deprecated React.ReactChild with ReactElement | number | string union
src/Common/API/QueryClientProvider.tsx Updated cacheTime to gcTime for TanStack Query v5
src/Shared/Components/DatePicker/DateTimePicker.tsx Enabled navLayout prop (previously commented out)
Multiple type files Added type JSX imports for React 19 compatibility
Multiple component files Initialized useRef hooks with null instead of undefined
CLAUDE.md Added documentation file for Claude Code integration (new file)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Base automatically changed from feat/react-router-v6 to feat/react-18 March 2, 2026 08:35
@arunjaindev arunjaindev changed the title feat: enhance component type definitions and improve ref handling feat: upgrade to react 19 Mar 2, 2026
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.

2 participants

0