Skip to content

docs: add source-backed Recompose TypeScript examples#277

Open
apples-kksk wants to merge 2 commits into
piotrwitek:masterfrom
apples-kksk:recompose-playground-examples
Open

docs: add source-backed Recompose TypeScript examples#277
apples-kksk wants to merge 2 commits into
piotrwitek:masterfrom
apples-kksk:recompose-playground-examples

Conversation

@apples-kksk

@apples-kksk apples-kksk commented May 16, 2026

Copy link
Copy Markdown

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 through README_SOURCE.md, and are included in the generated README.md.

This keeps the examples out of the runtime playground bundle. recompose itself declares React <=16 peer support, while this playground uses React 18.1, so this PR only adds @types/recompose for 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-check
  • cd playground && npm ci
  • cd playground && npm run tsc
  • cd playground && npm run lint
  • cd playground && CI=true npm run test -- --watchAll=false
  • cd playground && npm run build

Note: 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

  • I have read CONTRIBUTING.md
  • I have edited README_SOURCE.md (NOT README.md)
  • I have run CI script locally npm run ci-check to generate an updated README.md
  • I have linked all related issues above
  • I have rebased my branch

IssueHunt Summary

Referenced issues

This pull request has been submitted to:


@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread playground/src/hoc/recompose-examples.tsx Outdated
@apples-kksk apples-kksk marked this pull request as ready for review May 16, 2026 09:25
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