-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Adds a TypeScript overview page #6120
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
bb508e9
Start of the typescript page
orta c897491
Intro
orta fe6523d
Intro
orta 678a7b8
Use State
orta 9c17b26
Use Reducer
orta b9bd621
Start of context
orta bbe4652
Use Ref
orta aa9519d
Events
orta 3285dfb
Wrap up 1st draft
orta 315258f
Better titles
orta a08f52b
Apply suggestions from code review
orta 0f29e56
Note types/react and types/react-dom, and tone down the usecontext nu…
orta 7e0d185
Feedback
orta 2002ffb
Given a 2nd run through of the doc
orta 8bb4701
Apply suggestions from code review
orta 5d52e5e
Document where `State` is coming from
6ca7d17
Link what inferred types are
42fd5a4
Remove "knock-on"
c0e6963
Move useRef TS usage to useRef reference page
26d63b3
Add installation section
3ba1764
Link to framework specific guides
9c4e986
Edits
rickhanlonii 2030ed3
Edit footer
rickhanlonii c492f08
Rm useRef docs
rickhanlonii File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Wrap up 1st draft
- Loading branch information
commit 3285dfb84dedf0f079dec382831169ee6e6f5456
There are no files selected for viewing
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
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.
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.
It would be nice to explain how you choose the
event
type ie. WhyChangeEvent
? And whyHTMLInputElement
?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.
Yeah, I think this makes sense 👍🏻
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.
Extra attention to
target
vscurrentTarget
would be nice since this is a recurring issue where people thinktarget
should beT
instead of justEventTarget
for every eventThere 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.
@eps1lon can you please re-explain this point? I'm not quite sure I get the distinction on
target
vscurrentTarget
enough to get the valueThere 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.
We should do this in a follow-up since it depends on the event. It doesn't block this from being merged.
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.
Can we juste use the type
const handleChange: ComponentProps<'input'>['onChange'] = (e) => {}
instead manualy typing all args ?