docs: add source-backed Recompose TypeScript examples#277
Open
apples-kksk wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds a new section to the documentation and playground featuring legacy recompose examples, including a counter and a toggle component implemented with Higher-Order Components. The feedback identifies a type definition error in the CounterStateProps interface where the state updater's return type should be void instead of number to correctly align with recompose type definitions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Related to #46.
Adds a source-backed Recompose section to the Higher-Order Components part of the guide. The examples live in
playground/src/hoc, are injected throughREADME_SOURCE.md, and are included in the generatedREADME.md.This keeps the examples out of the runtime playground bundle.
recomposeitself declares React <=16 peer support, while this playground uses React 18.1, so this PR only adds@types/recomposefor type-checking the examples.Existing PRs cover useful parts of the request; this one focuses on the original source-backed/docs-generation path rather than inline README snippets. If maintainers prefer another PR or #94 as the base, I can port these changes there.
Related issues:
Validation
npm run ci-checkcd playground && npm cicd playground && npm run tsccd playground && npm run lintcd playground && CI=true npm run test -- --watchAll=falsecd playground && npm run buildNote:
node -e "require.resolve('recompose')"fails as expected because this PR intentionally does not install the runtime package. The examples are source-backed/type-checked documentation snippets, not a runtime demo.Checklist
README_SOURCE.md(NOTREADME.md)npm run ci-checkto generate an updatedREADME.mdIssueHunt Summary
Referenced issues
This pull request has been submitted to: