Skip to content

Commit affcdf8

Browse files
committed
format
1 parent 8a0ba06 commit affcdf8

File tree

2 files changed

+22
-23
lines changed

2 files changed

+22
-23
lines changed

docs/basic/getting-started/forms-and-events.md

+21-22
Original file line numberDiff line numberDiff line change
@@ -101,25 +101,24 @@ Of course, if you're making any sort of significant form, [you should use Formik
101101

102102
### List of event types
103103

104-
105-
| Event Type | Description |
106-
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------- |
107-
| AnimationEvent | CSS Animations. |
108-
| ChangeEvent | Changing the value of `<input>`, `<select>` and `<textarea>` element. |
109-
| ClipboardEvent | Using copy, paste and cut events. |
110-
| CompositionEvent | Events that occur due to the user indirectly entering text (e.g. depending on Browser and PC setup, a popup window may appear with additional characters if you e.g. want to type Japanese on a US Keyboard) |
111-
| DragEvent | Drag and drop interaction with a pointer device (e.g. mouse). |
112-
| FocusEvent | Event that occurs when elements gets or loses focus. |
113-
| FormEvent | Event that occurs whenever a form or form element gets/loses focus, a form element value is changed or the form is submitted. |
114-
| InvalidEvent | Fired when validity restrictions of an input fails (e.g `<input type="number" max="10">` and someone would insert number 20). |
115-
| KeyboardEvent | User interaction with the keyboard. Each event describes a single key interaction. |
116-
| MouseEvent | Events that occur due to the user interacting with a pointing device (e.g. mouse) |
117-
| PointerEvent | Events that occur due to user interaction with a variety pointing of devices such as mouse, pen/stylus, a touchscreen and which also supports multi-touch. Unless you develop for older browsers (IE10 or Safari 12), pointer events are recommended. Extends UIEvent. |
118-
| TouchEvent | Events that occur due to the user interacting with a touch device. Extends UIEvent. |
119-
| TransitionEvent | CSS Transition. Not fully browser supported. Extends UIEvent |
120-
| UIEvent | Base Event for Mouse, Touch and Pointer events. |
121-
| WheelEvent | Scrolling on a mouse wheel or similar input device. (Note: `wheel` event should not be confused with the `scroll` event) |
122-
| SyntheticEvent | The base event for all above events. Should be used when unsure about event type |
104+
| Event Type | Description |
105+
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
106+
| AnimationEvent | CSS Animations. |
107+
| ChangeEvent | Changing the value of `<input>`, `<select>` and `<textarea>` element. |
108+
| ClipboardEvent | Using copy, paste and cut events. |
109+
| CompositionEvent | Events that occur due to the user indirectly entering text (e.g. depending on Browser and PC setup, a popup window may appear with additional characters if you e.g. want to type Japanese on a US Keyboard) |
110+
| DragEvent | Drag and drop interaction with a pointer device (e.g. mouse). |
111+
| FocusEvent | Event that occurs when elements gets or loses focus. |
112+
| FormEvent | Event that occurs whenever a form or form element gets/loses focus, a form element value is changed or the form is submitted. |
113+
| InvalidEvent | Fired when validity restrictions of an input fails (e.g `<input type="number" max="10">` and someone would insert number 20). |
114+
| KeyboardEvent | User interaction with the keyboard. Each event describes a single key interaction. |
115+
| MouseEvent | Events that occur due to the user interacting with a pointing device (e.g. mouse) |
116+
| PointerEvent | Events that occur due to user interaction with a variety pointing of devices such as mouse, pen/stylus, a touchscreen and which also supports multi-touch. Unless you develop for older browsers (IE10 or Safari 12), pointer events are recommended. Extends UIEvent. |
117+
| TouchEvent | Events that occur due to the user interacting with a touch device. Extends UIEvent. |
118+
| TransitionEvent | CSS Transition. Not fully browser supported. Extends UIEvent |
119+
| UIEvent | Base Event for Mouse, Touch and Pointer events. |
120+
| WheelEvent | Scrolling on a mouse wheel or similar input device. (Note: `wheel` event should not be confused with the `scroll` event) |
121+
| SyntheticEvent | The base event for all above events. Should be used when unsure about event type |
123122

124123
<details>
125124
<summary>
@@ -132,8 +131,8 @@ You've probably noticed that there is no `InputEvent`. This is because it is not
132131

133132
Sources:
134133

135-
- https://github.com/microsoft/TypeScript/issues/29441
136-
- https://developer.mozilla.org/en-US/docs/Web/API/InputEvent
137-
- https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event
134+
- https://github.com/microsoft/TypeScript/issues/29441
135+
- https://developer.mozilla.org/en-US/docs/Web/API/InputEvent
136+
- https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event
138137

139138
</details>

docs/basic/getting-started/hooks.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ However, many hooks are initialized with null-ish default values, and you may wo
2323
const [user, setUser] = React.useState<IUser | null>(null);
2424

2525
// later...
26-
setUser(newUser);
26+
setUser(newUser);
2727
```
2828

2929
You can also use type assertions if a state is initialized soon after setup and always has a value after:

0 commit comments

Comments
 (0)