react-html-props
Advanced tools
Comparing version 1.0.28 to 1.0.29
{ | ||
"name": "react-html-props", | ||
"version": "1.0.28", | ||
"version": "1.0.29", | ||
"author": "Justin Mahar <contact@justinmahar.com>", | ||
@@ -5,0 +5,0 @@ "description": "Convenient TypeScript types for all React HTML props.", |
@@ -207,12 +207,6 @@ <h2 align="center"> | ||
For example, you can use `DivPropsWithoutRef` for a `div` without a React `ref`. | ||
For example, you can use `DivPropsWithoutRef` for a `div` without a React `ref`, and is equivalent to `React.HTMLAttributes<HTMLDivElement>`. | ||
Using the `div` example, `DivPropsWithoutRef` is defined as the following type: | ||
> A `ref` may not always be desirable, so it remains optional to give you flexibility. For instance, components returned by [`styled-components`](https://styled-components.com/) may not support React's `ref` type. | ||
```ts | ||
export type DivPropsWithoutRef = React.HTMLAttributes<HTMLDivElement>; | ||
``` | ||
> A `ref` may not always be desirable, so it remains optional to give you the flexibility. For instance, components returned by [`styled-components`](https://styled-components.com/) may not support React's `ref` type. | ||
## TypeScript | ||
@@ -219,0 +213,0 @@ |
49684
250