Skip to content

Conversation

@compulim
Copy link
Owner

@compulim compulim commented Aug 30, 2025

Changelog

Please copy and paste new entries from CHANGELOG.md here.

Added

  • (Preview) 💢 Changed signature to return wrapped return value, instead of plain ComponentType, by @compulim in PR #91, #92, #99, #100, #101
    • Fixed reactComponent() to return as ReactElement #104
    • Added wrapper component for reactComponent(), in PR #105

Specific changes

Please list each individual specific change in this pull request.

  • Added ReactComponentInit.wrapperComponent and wrapperProps to reactComponent()
    • Wrapper component helps cleaner props separation, for example, passing hidden props to context (wrapper)

@compulim compulim changed the title Feat wrapper Add wrapper component to reactComponent() Aug 30, 2025
@compulim compulim marked this pull request as ready for review August 30, 2025 18:43
@compulim compulim requested a review from Copilot August 30, 2025 18:43
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 adds wrapper component functionality to the reactComponent() function in the React Chain of Responsibility library. The enhancement allows developers to wrap components with additional functionality while maintaining clean props separation.

  • Adds wrapperComponent and wrapperProps configuration to reactComponent()
  • Includes comprehensive test coverage for various wrapper scenarios including prop overriding and function-based wrapper props
  • Updates build configuration to handle symbolic links more robustly

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/react-chain-of-responsibility/src/preview/createChainOfResponsibilityAsRenderCallback.tsx Implements core wrapper component functionality with new types and logic
packages/react-chain-of-responsibility/src/preview/tests/wrapper.test.tsx Basic wrapper component test with static props
packages/react-chain-of-responsibility/src/preview/tests/wrapper.wrapperProps.function.test.tsx Test for function-based wrapper props that compute values dynamically
packages/react-chain-of-responsibility/src/preview/tests/wrapper.overridePropsAndRequest.test.tsx Test for wrapper behavior with prop overrides and request modifications
packages/react-chain-of-responsibility/src/preview/tests/fallbackComponent.withPropsViaMiddleware.test.tsx Removes unused children property from Props type
packages/integration-test/package.json Adds --force flag to symbolic link creation for build robustness
CHANGELOG.md Updates changelog with wrapper component feature documentation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

compulim and others added 2 commits August 30, 2025 11:44
…er.wrapperProps.function.test.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…er.overridePropsAndRequest.test.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@compulim compulim merged commit c2f17da into main Aug 30, 2025
15 checks passed
@compulim compulim deleted the feat-wrapper branch August 30, 2025 18:51
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