Skip to content

Commit d6f340e

Browse files
committed
Update readme
1 parent 7f1b0f2 commit d6f340e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ Code is in the [`/demo`](/demo) folder, or open the [demo in CodeSandbox](https:
2525

2626
## Basics
2727

28+
[Install](#install), [`as` prop](#polymorphic-as-prop), [Interactive state](#interactive-state), [CSS](#styling-with-css), [CSS-in-JS](#styling-with-css-in-js), [Inline styles](#styling-with-inline-styles), [Interactive state changes](#reacting-to-interactive-state-changes), [Interactive state in `children`](#using-the-interactive-state-in-children), [Extending `<Interactive>`](#extending-the-interactive-component)
29+
30+
---
31+
32+
### Install
33+
2834
```shell
2935
npm install --save react-interactive
3036
```
@@ -539,6 +545,12 @@ const App = () => {
539545

540546
## Using with TypeScript
541547

548+
[Basics](#typescript-basics), [Exported `types`](#exported-types-from-react-interactive), [`onStateChange` callback and `children` as a function](#typing-onstatechange-callback-and-children-as-a-function), [Props passed to `<Interactive>`](#typing-props-passed-to-interactive), [Components that wrap `<Interactive>`](#typing-components-that-wrap-interactive)
549+
550+
---
551+
552+
### TypeScript Basics
553+
542554
React Interactive is fully typed, including the polymorphic `as` prop. The props that an `<Interactive>` component accepts are a union of its own props and the props that the `as` prop accepts. Live TypeScript examples are available in [TypeScriptExamples.tsx](https://github.com/rafgraph/react-interactive/blob/main/demo/src/other/TypeScriptExamples.tsx) in the demo app.
543555

544556
```ts

0 commit comments

Comments
 (0)