Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

refactor(project): improve typescript branch #120

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

@suddenlyGiovanni
Copy link

@suddenlyGiovanni suddenlyGiovanni commented Jan 20, 2021

As for PR: https://github.com/kentcdodds/react-hooks/pull/112#issue-554331129

Story

As a trainee, I want the reference files ./src/final-ts/** to be written in TypeScript React so that I can better understand React's API."

AC:

  1. Project should be configured to support both TypeScript and Javascript
  2. The trainee must be able to work in the ./src/exercises folder with no consequences.
  3. All source code in ./src/final-ts/should be refactored to TypeScript.
  4. Only syntax changes are allowed.
    4.1. The codebase should remain as close as possible to @kentcdodds's initial implementation.
    4.2. Should avoid distracting the user with complicated type signatures
  5. The code changes should expose only the best practices for production-ready React/Typescript codebase.
  6. All tests must pass!

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
@suddenlyGiovanni suddenlyGiovanni force-pushed the pr/refactor-typescript branch 3 times, most recently from a7d5464 to d70016e Compare January 25, 2021 17:23
@suddenlyGiovanni suddenlyGiovanni marked this pull request as ready for review January 25, 2021 17:23
kentcdodds and others added 2 commits January 30, 2021 14:32
refactor(project): convert entry files to typescript
refactor(exercise-01): convert to typescript react
refactor(exercise-01): to ts: extra credit 1. accept the step as the action
refactor(exercise-01): to ts: extra credit 2. simulate setState with an object
refactor(exercise-01): to ts: extra credit 3. simulate setState with object|function
refactor(exercise-01): to ts: extra credit 4. traditional dispatch object
refactor(pokemon.js): to ts
refactor(exercise-02): to ts
refactor(exercise-02): to ts: extra credit 1: use useCallback
refactor(exercise-02): to ts: extra credit 2: return a memoized run function from useAsync
refactor(exercise-02): to ts: extra credit 3: make safeDispatch
refactor(final): move typescript final solution to `src/final-ts/`
refactor(exercise-03): to ts
refactor(exercise-03): to ts: extra credit 1: create a consumer hook
refactor(exercise-03): to ts: extra credit 2: caching in a context provider
refactor(exercise-04): to ts
refactor(exercise-05): to ts
refactor(exercise-06): to ts
Copy link
Member

Thanks again for the PR. I've finished my own updates. If you find ways to improve what I've done in the next branch feel free to let me know :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /