-
Notifications
You must be signed in to change notification settings - Fork 0
Add wrapper component to reactComponent()
#105
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
Conversation
There was a problem hiding this 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
wrapperComponentandwrapperPropsconfiguration toreactComponent() - 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.
packages/react-chain-of-responsibility/src/preview/tests/wrapper.wrapperProps.function.test.tsx
Outdated
Show resolved
Hide resolved
...ges/react-chain-of-responsibility/src/preview/tests/wrapper.overridePropsAndRequest.test.tsx
Outdated
Show resolved
Hide resolved
…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>
Changelog
Added
ComponentType, by @compulim in PR #91, #92, #99, #100, #101reactComponent()to return asReactElement#104reactComponent(), in PR #105Specific changes
ReactComponentInit.wrapperComponentandwrapperPropstoreactComponent()