Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 17, 2025

Upgrades @enonic/react-components to version 6.1.0-A1 for React 19 and Next.js 16 compatibility.

Implementation

  • Package upgrade: Updated to published version @enonic/react-components@6.1.0-A1
  • React 19 upgrade: react@18.3.1react@19.2.3 + corresponding type definitions
  • API compatibility fixes: RichText component now requires meta and component props per new API contract
  • Documentation updates: Updated tutorial to reference @6.1.0-A1 and use vite@latest for future compatibility

Code Changes

The new @enonic/react-components API requires meta and component props on RichText:

const meta: RichTextMetaData = {
    type: 'part',
    id: 'standalone',
    path: '/',
    mode: 'inline'
};

const component: PartData = {
    descriptor: 'standalone:app',
    path: '/',
    type: 'part'
};

<RichText
    data={bio}
    meta={meta}
    component={component}
    // ... other props
/>

Type assertion added in Macro.tsx for config parameter (now unknown instead of inferred type).

Dependencies Updated

  • @enonic/react-components: 5.0.16.1.0-A1
  • react: ^18.3.1^19.2.3
  • react-dom: ^18.3.1^19.2.3
  • @types/react: ^18.3.12^19.2.7
  • @types/react-dom: ^18.3.1^19.2.3
Original prompt

This section details on the original issue you should resolve

<issue_title>Upgrade to react-components with next 16 and react 19</issue_title>
<issue_description>Use following npm-react-components branch https://github.com/enonic/npm-react-components/tree/issue-285</issue_description>

<agent_instructions>Do it similarly to what has been done here enonic/npm-nextjs-adapter#1064</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: pmi <754221+pmi@users.noreply.github.com>
Copilot AI changed the title [WIP] Upgrade to react-components with next 16 and react 19 Upgrade to @enonic/react-components with React 19 support Dec 17, 2025
Copilot AI requested a review from pmi December 17, 2025 13:39
@pmi
Copy link
Member

pmi commented Dec 17, 2025

@copilot update npm create vite@6.1.1 react-enonic -- --template react-ts line in the adoc file to use latest vite version allowing for future feature releases

Co-authored-by: pmi <754221+pmi@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 17, 2025

@copilot update npm create vite@6.1.1 react-enonic -- --template react-ts line in the adoc file to use latest vite version allowing for future feature releases

Updated to @latest in commit 89b4c9d. This allows npm to use the latest stable vite version and automatically get future feature releases.

@pmi pmi force-pushed the copilot/upgrade-react-components-next-16 branch from a6d3fea to 1e9bcd6 Compare December 18, 2025 09:08
@pmi
Copy link
Member

pmi commented Dec 18, 2025

@copilot use @enonic/react-components@6.1.0-A1 and cleanup usages of local file

Co-authored-by: pmi <754221+pmi@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 18, 2025

@copilot use @enonic/react-components@6.1.0-A1 and cleanup usages of local file

Updated to use published version @enonic/react-components@6.1.0-A1 and removed .build-cache directory in commit d45ef9a. Build tested successfully.

Copilot AI changed the title Upgrade to @enonic/react-components with React 19 support Upgrade to @enonic/react-components@6.1.0-A1 with React 19 support Dec 18, 2025
@pmi pmi marked this pull request as ready for review December 19, 2025 13:27
@pmi pmi merged commit 3674e82 into master Jan 12, 2026
1 check passed
@pmi pmi deleted the copilot/upgrade-react-components-next-16 branch January 12, 2026 09:38
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.

Upgrade to react-components 6.1.0 with react 19

2 participants