Skip to content

Commit 6f0ab32

Browse files
committed
Manually fix up TOC
1 parent da08ba7 commit 6f0ab32

File tree

1 file changed

+45
-78
lines changed

1 file changed

+45
-78
lines changed

README.md

Lines changed: 45 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -63,92 +63,59 @@
6363

6464
<summary><b>Expand Table of Contents</b></summary>
6565

66-
- [Section 1: Setup TypeScript with React](#section-1-setup-typescript-with-react)
66+
- [Section 1: Setup TypeScript with React](#section-1--setup-typescript-with-react)
67+
<!--START-SECTION:setup-toc-->
6768
- [Prerequisites](#prerequisites)
69+
- [VS Code Extensions](#vs-code-extensions)
6870
- [React + TypeScript Starter Kits](#react--typescript-starter-kits)
6971
- [Import React](#import-react)
70-
- [Section 2: Getting Started](#section-2-getting-started)
72+
- [Video Tutorial](#video-tutorial)<!--END-SECTION:setup-toc-->
73+
- [Section 2: Getting Started](#section-2--getting-started)
7174
- [Function Components](#function-components)
7275
- [Hooks](#hooks)
7376
- [useState](#usestate)
7477
- [useReducer](#usereducer)
75-
- [useEffect](#useeffect--uselayouteffect)
78+
- [useEffect / useLayoutEffect](#useeffect---uselayouteffect)
7679
- [useRef](#useref)
80+
- [Option 1: DOM element ref](#option-1--dom-element-ref)
81+
- [Option 2: Mutable value ref](#option-2--mutable-value-ref)
82+
- [See also](#see-also)
7783
- [useImperativeHandle](#useimperativehandle)
7884
- [Custom Hooks](#custom-hooks)
85+
- [More Hooks + TypeScript reading:](#more-hooks---typescript-reading-)
86+
- [Example React Hooks + TypeScript Libraries:](#example-react-hooks---typescript-libraries-)
7987
- [Class Components](#class-components)
80-
- [You May Not Need `defaultProps`](#you-may-not-need-defaultprops)
81-
- [Typing `defaultProps`](#typing-defaultprops)
88+
- [Typing getDerivedStateFromProps](#typing-getderivedstatefromprops)
89+
- [You May Not Need `defaultProps`](#you-may-not-need--defaultprops-)
90+
- [Typing `defaultProps`](#typing--defaultprops-)
8291
- [Consuming Props of a Component with defaultProps](#consuming-props-of-a-component-with-defaultprops)
8392
- [Problem Statement](#problem-statement)
8493
- [Solution](#solution)
8594
- [Misc Discussions and Knowledge](#misc-discussions-and-knowledge)
95+
- [Typing Component Props](#typing-component-props)
8696
- [Basic Prop Types Examples](#basic-prop-types-examples)
8797
- [Useful React Prop Type Examples](#useful-react-prop-type-examples)
88-
- [getDerivedStateFromProps](#getderivedstatefromprops)
89-
- [Forms and Events](#forms-and-events)
90-
- [Context](#context)
91-
- [Basic Example](#basic-example)
92-
- [Extended Example](#extended-example)
93-
- [forwardRef/createRef](#forwardrefcreateref)
94-
- [Portals](#portals)
95-
- [Error Boundaries](#error-boundaries)
96-
- [Option 1: Using react-error-boundary](#option-1-using-react-error-boundary)
97-
- [Options 2: Writing your custom error boundary component](#options-2-writing-your-custom-error-boundary-component)
98-
- [Concurrent React/React Suspense](#concurrent-reactreact-suspense)
99-
- [Troubleshooting Handbook: Types](#troubleshooting-handbook-types)
100-
- [Union Types and Type Guarding](#union-types-and-type-guarding)
101-
- [Optional Types](#optional-types)
102-
- [Enum Types](#enum-types)
103-
- [Type Assertion](#type-assertion)
104-
- [Simulating Nominal Types](#simulating-nominal-types)
105-
- [Intersection Types](#intersection-types)
106-
- [Union Types](#union-types)
107-
- [Overloading Function Types](#overloading-function-types)
108-
- [Using Inferred Types](#using-inferred-types)
109-
- [Using Partial Types](#using-partial-types)
110-
- [The Types I need weren't exported!](#the-types-i-need-werent-exported)
111-
- [The Types I need don't exist!](#the-types-i-need-dont-exist)
112-
- [Slapping `any` on everything](#slapping-any-on-everything)
113-
- [Autogenerate types](#autogenerate-types)
114-
- [Typing Exported Hooks](#typing-exported-hooks)
115-
- [Typing Exported Components](#typing-exported-components)
116-
- [Troubleshooting Handbook: Operators](#troubleshooting-handbook-operators)
117-
- [Troubleshooting Handbook: Utilities](#troubleshooting-handbook-utilities)
118-
- [Troubleshooting Handbook: tsconfig.json](#troubleshooting-handbook-tsconfigjson)
119-
- [Troubleshooting Handbook: Fixing bugs in official typings](#troubleshooting-handbook-fixing-bugs-in-official-typings)
120-
- [Troubleshooting Handbook: Globals, Images and other non-TS files](#troubleshooting-handbook-globals-images-and-other-non-ts-files)
121-
- [Other React + TypeScript resources](#other-react--typescript-resources)
122-
- [Editor Tooling and Integration](#editor-tooling-and-integration)
123-
- [Linting](#linting)
124-
- [Other React + TypeScript resources](#other-react--typescript-resources-1)
125-
- [Recommended React + TypeScript talks](#recommended-react--typescript-talks)
126-
- [Time to Really Learn TypeScript](#time-to-really-learn-typescript)
127-
- [Example App](#example-app)
128-
- [My question isn't answered here!](#my-question-isnt-answered-here)
129-
- [Contributors](#contributors)
130-
<!--START-SECTION:setup-toc-->
131-
- [Prerequisites](#prerequisites)
132-
- [VS Code Extensions](#vs-code-extensions)
133-
- [React + TypeScript Starter Kits](#react--typescript-starter-kits)
134-
- [Import React](#import-react)
135-
- [Video Tutorial](#video-tutorial)<!--END-SECTION:setup-toc-->
136-
- [Section 2: Getting Started](#section-2-getting-started)
137-
- [Function Components](#function-components)
138-
- [Hooks](#hooks)
139-
- [Class Components](#class-components)
140-
- [Typing defaultProps](#typing-defaultprops)
141-
- [Types or Interfaces?](#types-or-interfaces)
142-
- [Basic Prop Types Examples](#basic-prop-types-examples)
143-
- [Useful React Prop Type Examples](#useful-react-prop-type-examples)
144-
- [getDerivedStateFromProps](#getDerivedStateFromProps)
145-
- [Forms and Events](#forms-and-events)
146-
- [Context](#context)
147-
- [forwardRef/createRef](#forwardrefcreateref)
148-
- [Portals](#portals)
149-
- [Error Boundaries](#error-boundaries)
150-
- [Concurrent React/React Suspense](#concurrent-reactreact-suspense)
151-
- [Basic Troubleshooting Handbook: Types](#basic-troubleshooting-handbook-types)
98+
- [Types or Interfaces?](#types-or-interfaces-)
99+
- [TL;DR](#tl-dr)
100+
- [More Advice](#more-advice)
101+
- [Useful table for Types vs Interfaces](#useful-table-for-types-vs-interfaces)
102+
- [getDerivedStateFromProps](#getderivedstatefromprops)
103+
- [Forms and Events](#forms-and-events)
104+
- [List of event types](#list-of-event-types)
105+
- [Context](#context)
106+
- [Basic Example](#basic-example)
107+
- [Extended Example](#extended-example)
108+
- [forwardRef/createRef](#forwardref-createref)
109+
- [Generic forwardRefs](#generic-forwardrefs)
110+
- [Option 1 - Wrapper component](#option-1---wrapper-component)
111+
- [Option 2 - Redeclare forwardRef](#option-2---redeclare-forwardref)
112+
- [More Info](#more-info)
113+
- [Portals](#portals)
114+
- [Error Boundaries](#error-boundaries)
115+
- [Option 1: Using react-error-boundary](#option-1--using-react-error-boundary)
116+
- [Options 2: Writing your custom error boundary component](#options-2--writing-your-custom-error-boundary-component)
117+
- [Concurrent React/React Suspense](#concurrent-react-react-suspense)
118+
- [Troubleshooting Handbook: Types](#troubleshooting-handbook--types)
152119
<!--START-SECTION:types-toc-->
153120
- [Union Types and Type Guarding](#union-types-and-type-guarding)
154121
- [Optional Types](#optional-types)
@@ -169,19 +136,19 @@
169136
- [Frequent Known Problems with TypeScript](#frequent-known-problems-with-typescript)
170137
- [TypeScript doesn't narrow after an object element null check](#typescript-doesnt-narrow-after-an-object-element-null-check)
171138
- [TypeScript doesn't let you restrict the type of children](#typescript-doesnt-let-you-restrict-the-type-of-children)<!--END-SECTION:types-toc-->
172-
- [Troubleshooting Handbook: Operators](#troubleshooting-handbook-operators)
173-
- [Troubleshooting Handbook: Utilties](#troubleshooting-handbook-utilities)
174-
- [Troubleshooting Handbook: tsconfig.json](#troubleshooting-handbook-tsconfigjson)
175-
- [Troubleshooting Handbook: Bugs in official typings](#troubleshooting-handbook-bugs-in-official-typings)
176-
- [Recommended React + TypeScript codebases to learn from](#recommended-react--typescript-codebases-to-learn-from)
139+
- [Troubleshooting Handbook: Operators](#troubleshooting-handbook--operators)
140+
- [Troubleshooting Handbook: Utilities](#troubleshooting-handbook--utilities)
141+
- [Troubleshooting Handbook: tsconfig.json](#troubleshooting-handbook--tsconfigjson)
142+
- [Troubleshooting Handbook: Fixing bugs in official typings](#troubleshooting-handbook--fixing-bugs-in-official-typings)
143+
- [Troubleshooting Handbook: Globals, Images and other non-TS files](#troubleshooting-handbook--globals--images-and-other-non-ts-files)
177144
- [Editor Tooling and Integration](#editor-tooling-and-integration)
178145
- [Linting](#linting)
179-
- [Other React + TypeScript resources](#other-react--typescript-resources)
180-
- [Recommended React + TypeScript talks](#recommended-react--typescript-talks)
146+
- [Other React + TypeScript resources](#other-react---typescript-resources)
147+
- [Recommended React + TypeScript talks](#recommended-react---typescript-talks)
181148
- [Time to Really Learn TypeScript](#time-to-really-learn-typescript)
182149
- [Example App](#example-app)
183-
- [My question isn't answered here!](#my-question-isnt-answered-here)
184-
</details>
150+
151+
</details>
185152

186153
<!--START-SECTION:setup-->
187154

0 commit comments

Comments
 (0)