Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions content/en/guide/v10/differences-to-react.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ The main difference when comparing Preact and React apps is that we don't ship o

For us it doesn't make sense as the browser's event system supports all features we need. A full custom event implementation would mean more maintenance overhead and a larger API surface area for us.

We've come across the following differences between React's synthetic event system and native browser events:
We've come across the following differences that Preact has to React. Preact uses:

- Events don't bubble through `<Portal>` components
- The clear "x" button for `<input type="search">` does not fire an `input` event in IE11 - use `onSearch` instead
- Use `onInput` instead of `onChange` for `<input>` elements (**only if `preact/compat` is not used**)
- Use `onDblClick` instead of `onDoubleClick` (**only if `preact/compat` is not used**)
- Native browser events which don't bubble up through `<Portal>` components
- `onSearch` instead of `<input type="search">`, since the clear "x" button otherwise does not fire an `input` event in IE11
- `onInput` instead of `onChange` for `<input>` elements (**only if `preact/compat` is not used**)
- `onDblClick` instead of `onDoubleClick` (**only if `preact/compat` is not used**)

The other main difference is that Preact follows the DOM specification more closely. An example of this is the ability to use `class` instead of `className`.

Expand Down