Skip to content

Commit af99557

Browse files
committed
Remove more compat IE11 stuff
1 parent 641eedd commit af99557

File tree

6 files changed

+2
-62
lines changed

6 files changed

+2
-62
lines changed

TODO.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
- https://github.com/preactjs/preact/pull/4362
22
- https://github.com/preactjs/preact/pull/4358
33
- https://github.com/preactjs/preact/pull/4361
4-
- https://github.com/preactjs/preact/pull/4460
5-
- https://github.com/preactjs/preact/pull/4453
64
- Backing VNodes
5+
- Enable removing classes from the bundle
76
- Remove deprecated lifecycle methods
87
- Try to get rid of DOM pointers
98
- Separate mount/update paths

compat/src/index.d.ts

-5
Original file line numberDiff line numberDiff line change
@@ -774,11 +774,6 @@ declare namespace React {
774774
export function flushSync<R>(fn: () => R): R;
775775
export function flushSync<A, R>(fn: (a: A) => R, a: A): R;
776776

777-
export function unstable_batchedUpdates(
778-
callback: (arg?: any) => void,
779-
arg?: any
780-
): void;
781-
782777
export type PropsWithChildren<P = unknown> = P & {
783778
children?: preact.ComponentChildren | undefined;
784779
};

compat/src/index.js

-13
Original file line numberDiff line numberDiff line change
@@ -116,16 +116,6 @@ function findDOMNode(component) {
116116
);
117117
}
118118

119-
/**
120-
* Deprecated way to control batched rendering inside the reconciler, but we
121-
* already schedule in batches inside our rendering code
122-
* @template Arg
123-
* @param {(arg: Arg) => void} callback function that triggers the updated
124-
* @param {Arg} [arg] Optional argument that can be passed to the callback
125-
*/
126-
// eslint-disable-next-line camelcase
127-
const unstable_batchedUpdates = (callback, arg) => callback(arg);
128-
129119
/**
130120
* In React, `flushSync` flushes the entire tree and forces a rerender. It's
131121
* implmented here as a no-op.
@@ -237,8 +227,6 @@ export {
237227
memo,
238228
forwardRef,
239229
flushSync,
240-
// eslint-disable-next-line camelcase
241-
unstable_batchedUpdates,
242230
StrictMode,
243231
Suspense,
244232
lazy,
@@ -285,7 +273,6 @@ export default {
285273
memo,
286274
forwardRef,
287275
flushSync,
288-
unstable_batchedUpdates,
289276
StrictMode,
290277
Suspense,
291278
lazy,

compat/src/render.js

+1-7
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,7 @@ const CAMEL_REPLACE = /[A-Z0-9]/g;
3636
const IS_DOM = typeof document !== 'undefined';
3737

3838
// Input types for which onchange should not be converted to oninput.
39-
// type="file|checkbox|radio", plus "range" in IE11.
40-
// (IE11 doesn't support Symbol, which we use here to turn `rad` into `ra` which matches "range")
41-
const onChangeInputType = type =>
42-
(typeof Symbol != 'undefined' && typeof Symbol() == 'symbol'
43-
? /fil|che|rad/
44-
: /fil|che|ra/
45-
).test(type);
39+
const onChangeInputType = type => /fil|che|rad/.test(type);
4640

4741
// Some libraries like `react-virtualized` explicitly check for this.
4842
Component.prototype.isReactComponent = {};

compat/test/browser/exports.test.js

-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ describe('compat exports', () => {
5858
expect(Compat.Children.toArray).to.exist.and.be.a('function');
5959
expect(Compat.Children.only).to.exist.and.be.a('function');
6060
expect(Compat.unmountComponentAtNode).to.exist.and.be.a('function');
61-
expect(Compat.unstable_batchedUpdates).to.exist.and.be.a('function');
6261
expect(Compat.version).to.exist.and.be.a('string');
6362
expect(Compat.startTransition).to.be.a('function');
6463
});
@@ -99,7 +98,6 @@ describe('compat exports', () => {
9998
expect(Named.Children.toArray).to.exist.and.be.a('function');
10099
expect(Named.Children.only).to.exist.and.be.a('function');
101100
expect(Named.unmountComponentAtNode).to.exist.and.be.a('function');
102-
expect(Named.unstable_batchedUpdates).to.exist.and.be.a('function');
103101
expect(Named.version).to.exist.and.be.a('string');
104102
});
105103
});

compat/test/browser/unstable_batchedUpdates.test.js

-33
This file was deleted.

0 commit comments

Comments
 (0)