Skip to content

Conversation

@GauBen
Copy link
Member

@GauBen GauBen commented Dec 19, 2025

Description

Represents all of the things React can render.
Where ReactElement only represents JSX, ReactNode represents everything that can be rendered.

Checklist

Source code

  • I've shared and documented any breaking change
  • I've reviewed and updated the jahia-depends

Tests

  • I've provided Unit and/or Integration Tests
  • I've updated the parent issue with required manual validations

Tip

Documentation to guide the reviews: How to do a code review

@GauBen GauBen requested a review from a team as a code owner December 19, 2025 15:20
Copilot AI review requested due to automatic review settings December 19, 2025 15:20
Copy link
Contributor

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 relaxes the return type constraint for Jahia components from JSX.Element to ReactNode, providing more flexibility for component implementations while maintaining type safety.

Key Changes:

  • Updated the generic type constraint in jahiaComponent function from JSX.Element to ReactNode
  • Updated the wrap function's component parameter type to match the new return type
  • Changed import from JSX type to ReactNode type from React

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

@GauBen GauBen enabled auto-merge (squash) December 19, 2025 15:33
@GauBen GauBen merged commit dc689ed into main Dec 19, 2025
18 checks passed
@GauBen GauBen deleted the fix/relax-type branch December 19, 2025 15:44
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.

3 participants