-
-
Notifications
You must be signed in to change notification settings - Fork 924
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
Revised Component types (children, ref) #877
Merged
Merged
Commits on Mar 7, 2022
-
Revised Component types (children, readonly, ref)
* Rename past `Component` type to `ComponentWithChildren`. Motivation: Most components don't actually support children. This causes a type error upon accidental passing of children / forces you to think about which components support children. * Added second parameter to `ComponentWithChildren` to make it easier to give a custom type for `children` (but still defaults to useful `JSX.Element`). * New `Component` type does not have automatic `children` property (like React's preferred `VoidFunctionalComponent`), offering another natural way to type `props.children`: `Component<{children: JSX.Element}>`. * `props` argument in both `Component` and `ComponentWithChildren` automatically cast to `readonly` (shallow one level only), to avoid accidental assignment to `props.foo` (usually a getter) while still allowing passing mutables in props. Add `Props<T>` helper for this transformation. * Add @lxsmnsyc's `Ref<T>` type so it's easy to type `props.ref`: `Component<{ref: Ref<Element>}>`. <solidjs#778 (comment)> Fixes solidjs#778.
Configuration menu - View commit details
-
Copy full SHA for ca992c6 - Browse repository at this point
Copy the full SHA ca992c6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 64d8af1 - Browse repository at this point
Copy the full SHA 64d8af1View commit details -
Configuration menu - View commit details
-
Copy full SHA for fb8e4c9 - Browse repository at this point
Copy the full SHA fb8e4c9View commit details
Commits on Apr 11, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 1449595 - Browse repository at this point
Copy the full SHA 1449595View commit details
Commits on Apr 12, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 72a3ed0 - Browse repository at this point
Copy the full SHA 72a3ed0View commit details -
Add default types, Context.Provider require children
Comments from Otonashi
Configuration menu - View commit details
-
Copy full SHA for cc37b34 - Browse repository at this point
Copy the full SHA cc37b34View commit details -
Configuration menu - View commit details
-
Copy full SHA for b43ef31 - Browse repository at this point
Copy the full SHA b43ef31View commit details -
Configuration menu - View commit details
-
Copy full SHA for 68c6253 - Browse repository at this point
Copy the full SHA 68c6253View commit details
Commits on Apr 28, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 8cbd4b1 - Browse repository at this point
Copy the full SHA 8cbd4b1View commit details
Commits on May 2, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 6948a60 - Browse repository at this point
Copy the full SHA 6948a60View commit details -
Configuration menu - View commit details
-
Copy full SHA for 222f874 - Browse repository at this point
Copy the full SHA 222f874View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5f36ad6 - Browse repository at this point
Copy the full SHA 5f36ad6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 27d708e - Browse repository at this point
Copy the full SHA 27d708eView commit details
Commits on May 3, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 4daf201 - Browse repository at this point
Copy the full SHA 4daf201View commit details
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.