-
-
Notifications
You must be signed in to change notification settings - Fork 2k
(major) - Tracking PR for v11 #4549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
📊 Tachometer Benchmark ResultsSummaryduration
usedJSHeapSize
Resultscreate10kduration
usedJSHeapSize
filter-listduration
usedJSHeapSize
hydrate1kduration
usedJSHeapSize
many-updatesduration
usedJSHeapSize
replace1kduration
usedJSHeapSize
run-warmup-0
run-warmup-1
run-warmup-2
run-warmup-3
run-warmup-4
run-final
text-updateduration
usedJSHeapSize
tododuration
usedJSHeapSize
update10th1kduration
usedJSHeapSize
|
Size Change: -32.2 kB (-40.88%) 🎉 Total Size: 46.5 kB
ℹ️ View Unchanged
|
af99557
to
067be2b
Compare
#4406 would be another easy thing to fit in, swapping out our (pretty much unused & problematic) |
a12176d
to
14ea8f6
Compare
5caed5c
to
39339b2
Compare
d328910
to
41622b2
Compare
ef1f51f
to
d67c5b4
Compare
* Move `defaultProps` into `preact/compat` This will be handled in `options.vnode` for function/class components. This hook gets called for every invocation of `jsx`/`createElement` and `cloneElement`. * Try it * refactor: This is horrific but seems to work? (#4662) --------- Co-authored-by: Ryan Christian <[email protected]>
* Remove unused imports * Comment denoted hydration * Make it work * Golfies
* Remove unused imports * refactor: Switch to Object.is for hook args * refactor: Copy to `useReducer` & store `Object` accessor * test: Add tests for `useEffect` & `useState` w/ `NaN` Co-authored-by: jayrobin <[email protected]> --------- Co-authored-by: jdecroock <[email protected]> Co-authored-by: jayrobin <[email protected]>
This reverts commit 6b8bfa2.
* refactor: Switch to `package.json#exports.module`, drop `.min` builds, & use `.mjs` exclusively * chore: Remove leftover CJS shell * test: Fix export for karma * fix: coverage not generated in minify tests --------- Co-authored-by: Marvin Hagemeister <[email protected]>
* Remove automatic px suffix * Remove from jsx-runtime
* refactor: Restrict aria roles by element type * test: Add simple test for button roles * refactor: Make roles signalish * test: Add tests for `never` roles * refactor: Remove half-implemented select roles * fix: Ensure attributes w/ `never` roles can be constructed * refactor: Restrict more complex aria roles * refactor: Remove unused input type interface, fix select multiple type * fix: Ensure partials extend EventTarget * revert: Bring back input type attribute * test: Fix test typo * refactor: Remove 'generic' aria role from allowed values * refactor: Revise select multiple/size roles
|
||
**All the power of Virtual DOM components, without the overhead:** | ||
|
||
- Familiar React API & patterns: ES6 Class, hooks, and Functional Components | ||
- Extensive React compatibility via a simple [preact/compat] alias | ||
- Everything you need: JSX, <abbr title="Virtual DOM">VDOM</abbr>, [DevTools], <abbr title="Hot Module Replacement">HMR</abbr>, <abbr title="Server-Side Rendering">SSR</abbr>. | ||
- Highly optimized diff algorithm and seamless hydration from Server Side Rendering | ||
- Supports all modern browsers and IE11 | ||
- Supports all modern browsers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we want to specify here, it's fine if it's listed on the doc site instead IMO, but Symbol.for
in compat moves our minimums up to these browsers specifically:
chrome 40
safari 9
firefox 36
edge 12
export function useRef<T>(initialValue: T | null): RefObject<T>; | ||
export function useRef<T = undefined>(): MutableRef<T | undefined>; | ||
export function useRef<T>(initialValue: T): RefObject<T>; | ||
export function useRef<T>(initialValue: T | null): RefObject<T | null>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll probably need to make a list of breaking changes for types yet, of which this is one.
Our types here previously allowed (say) RefObject<HTMLDivElement | null>
to satisfy RefObject<HTMLDivElement>
-- obviously this is wrong, and off the top of my head, an issue React also corrected recently, but will require users in some cases to look at their types.
Maybe a general "We've made our types stricter in a number of cases to help users avoid unexpected behavior" would suffice, most of the changes are pretty self explanatory.
* refactor: Remove deprecated 'ForwardFn' type from compat * test: Correct type test
We will do this as a means to remove IE11, cleanup our imports exports and drive support for #4613 in 11 rather than X.
Closes #4613
Closes #4406
Closes #3084
Closes #4442
Closes #4461
Closes #3335 as won't do
Closes #2004 as won't do
Closes #2331 as won't do
Breaking changes
Component.base
SuspenseList
module.js
export refactor: Breaking changes to outputs & pkg.json #4652defaultProps
frompreact
and intopreact/compat
MovedefaultProps
intopreact/compat
#4657If you need this you can always polyfill it by doing
options.vnode = (vnode) => { if (vnode.props.ref) { vnode.ref = vnode.props.ref; delete vnode.props.ref; } }
style
px suffixing to compat, note that this affects core and the jsx-template transform (Remove automatic px suffix #4665)Features
Fixes
_listeners
(fix:_listeners
mangle to reduce collisions #4463)Object.is
for hook equality (refactor: Switch to Object.is for hook args #4663)Questions
_dirty
and others to_component
flagsCan be done outside of a major version
document
Add an option to inject thedocument
for arender()
#4500 and WrongDocumentError due todocument.createElement
#2545_force
on all components part of a bubbling phase useEffect didn't run in some rare case (lazy + memo) #4631 and the child component of ErrorBoundary, wrapped by memo function failed to recover from the last error #3449Rejected