Closed aaronlademann-wf closed 4 years ago
Recommendation: :bangbang: Major version bump (fyi @Workiva/semver-audit-group )
@@ line 6: package:react/src/prop_validator.dart @@
- typedef PropValidator<T> = Error Function(T props, PropValidatorInfo info)
+ typedef PropValidator<TProps> = Error Function(TProps props, PropValidatorInfo info)
// `type` of `props` has changed.
// Changing a parameter signature is a major change.
@@ line 104: package:react/src/context.dart @@
- Context createContext<TValue>([TValue defaultValue, int Function(TValue, TValue) calculateChangedBits])
+ Context<TValue> createContext<TValue>([TValue defaultValue, int Function(TValue, TValue) calculateChangedBits])
// `return_type` of `createContext` has changed from `Context` to `Context<TValue>`.
// Changing a top-level function is a major change.
@@ line 503: package:react/react.dart @@
abstract class Component2 implements Component
- Context get contextType
+ Context<dynamic> get contextType
// `type` of `contextType` has changed from `Context` to `Context<dynamic>`.
// Changing a class field is a major change.
@@ line 839: package:react/react_client.dart @@
class ReactDomComponentFactoryProxy extends ReactComponentFactoryProxy
- ReactDomComponentFactoryProxy ReactDomComponentFactoryProxy(dynamic name)
+ ReactDomComponentFactoryProxy ReactDomComponentFactoryProxy(String name)
// `type` of `name` has changed.
// Changing a parameter signature is a major change.
@@ line 125: package:react/react_client/react_interop.dart @@
- ReactJsComponentFactoryProxy forwardRef(dynamic Function(Map<dynamic, dynamic>, Ref<dynamic>) wrapperFunction)
+ ReactJsComponentFactoryProxy forwardRef(dynamic Function(Map<dynamic, dynamic>, Ref<dynamic>) wrapperFunction, {String displayName = 'Anonymous'})
// `displayName` was added.
// Adding an optional parameter is a minor change.
---
```diff
@@ line 2742: package:react/react.dart @@
- void setReactConfiguration(dynamic domCreator, dynamic customRegisterComponent, {ReactDartComponentFactoryProxy2
15 more changes could not be displayed on this comment. Click here to view all changes.
Showing results for 066c13863c6b54809a2947696e8746091c26251a
Powered by semver-audit-service. Please report any problems by filing an issue. Reported by the dart semver audit client 2.2.0 Browse public API.
Semver changes look good to me, and should not actually be considered major. Specifically
ReactDomComponentFactoryProxy
would have resulted in a runtime error,Context<dynamic>
from createContext
is considered a bug, and changing it shouldn't cause issues
This release of react includes...
New Features
🎉 🎉 🎉 Support for function components, memo and hooks!!! 🎉 🎉 🎉
Sooooo much work from so many amazing people made this possible, but to summarize:
221 Add support for function components
252 Add support for
memo
higher order component223 useState
233 useCallback
237 useContext
227 useEffect
248 useLayoutEffect
232 useReducer
245 useRef
250 useMemo
247 useImperativeHandle
246 useDebugValue
It works like this...
Define the component:
Render the component (exact same consumer API as a class-based component):
Fixes / Updates
253 Deprecate
setClientConfiguration
.273 Make
JsBackedMap.values
compatible with MSIE 11Changesets committed directly to the WIP branch that need review:
(Click on "Changes from X commits..." to see commit messages for more context)