over_react 3.1.0 over_react: ^3.1.0 copied to clipboard
A library for building statically-typed React UI components using Dart.
OverReact Changelog #
3.1.0 #
Full React JS 16.x Component Lifecycle Support #
-
The new
UiComponent2
classes* replace the now deprecatedUiComponent
classes.*(
UiComponent2
,UiStatefulComponent2
,FluxUiComponent2
)- Faster
- Initial renders ~10% faster
- Re-renders ~7 - 30% faster
- Improved developer experience
-
Props and state values now show up in the React DevTools just as they would if you were using React JS, and primitive values (strings, numbers, booleans) can be edited live, just like in React JS!
-
- Easier to maintain
- Easier integration with JS libs
ReactJsComponentFactoryProxy
makes it easy to use JS components with Dart!
- Supports new lifecycle methods, allowing us to use Concurrent Mode in the future
=>componentWillMount
componentDidMount
=>componentWillReceiveProps
getDerivedStateFromProps
(new)=>componentWillUpdate
getSnapshotBeforeUpdate
(new)componentDidCatch
/getDerivedStateFromError
(new)- Adds support for error boundaries.
- OverReact also provides an
ErrorBoundary
component out of the box that you can wrap around your components, and anErrorBoundaryMixin
that you can use as a starting point to build your own custom error boundary component!
- Faster
Improved, stable Context API #
- "Context provides a way to pass data through the component tree without having to pass props down manually at every level. … Context is primarily used when some data needs to be accessible by many components at different nesting levels. Apply it sparingly because it makes component reuse more difficult."
New over_react_redux.dart
Library #
- To take full advantage of the new stable
Context
API, we have built atop the awesome redux.dart library to make it easy to set up redux provider(s) / consumer(s) for OverReact components that enable granular, targeted updates!- Check out some examples
by cloning this project locally, running
webdev serve
from the root of the project, and navigating to http://localhost:8080/over_react_redux/. - Use it in your project by upgrading your
UiComponent
s toUiComponent2
and importingpackage:over_react/over_react_redux.dart
!
- Check out some examples
by cloning this project locally, running
- We've even got some sweet redux dev tools you can use to make the inspection of connected state a breeze!
Portals #
- "Portals provide a first-class way to render children into a DOM node that exists outside the DOM hierarchy of the parent component."
Fragments #
- "A common pattern in React is for a component to return multiple elements. Fragments let you group a list of children without adding extra nodes to the DOM."
UiComponent.render()
can now return aReactFragment
(multiple children) or other values like strings and lists instead of just a singleReactElement
.
No more Dart 1 SDK support #
- With the release of
3.1.0
comes the end of our+dart1
/+dart2
dual releases that we have been maintaining for over a year. Time to upgrade to Dart 2!
3.0.2 #
Dependency updates:
- Lower the dart_style constraint from ^1.3.1 to ^1.2.5 to help avoid version lock in downstream packages
- Open up built_value range to include 8.0.0
Complete
3.0.2
Changesets:
- Dart 2
- Dart 1 (No Changes)
3.0.1 #
- Lower the Dart SDK lower-bound to
2.4.0
. It was accidentally raised to2.4.1
in the 3.0.0 release.
Complete
3.0.1
Changesets:
- Dart 2
- Dart 1 (No Changes)
3.0.0 #
ReactJS 16.x Support
- Support for the new / updated lifecycle methods from ReactJS 16 will be released in version
3.1.0
.
Complete
3.0.0
Changesets:
2.7.0 #
2.7.0 #
2.6.1 #
Complete
2.6.1
Changsets:
- Dart 2
- Dart 1 (No Changes)
- #382 Update prop typedef to work around Dart 2.6 compiler regression
2.6.0 #
2.5.3 #
2.5.2 #
2.5.1 #
Complete
2.5.1
Changesets:
- Dart 2
- Dart 1 (no changes)
- Increase Dart SDK dependency lower-bound to
2.4.0
2.5.0 #
2.4.4 #
2.4.3 #
Complete
2.4.3
Changesets:
- Dart 2
- Dart 1 (no changes)
- #302 The builder now warns if an
.over_react.g.dart
part directive is found in a file that does not need one (i.e. it does not produce any generated output). - #306 The handler chaining utils (e.g.
domEventCallbacks
,Callback1Arg
, etc.) have been updated to accommodate the breaking language change in Dart 2.4 around covariance of type variables used in super-interfaces.
2.4.2 #
Complete
2.4.2
Changesets:
- #288 Downgrade parse error to fine so as to not fail build unnecessarily.
- #292 Update
react
dependency to version^4.7.0
, and remove references to deprecatedjsify
,getProperty
andsetProperty
members. - #294 Fix issue with
AbstractTransitionComponent
that causes ReactJSsetState
warnings to appear in the browser console.
2.4.0 #
Complete
2.4.0
Changesets:
- Dart 2
- Dart 1 (no changes)
- #280 Optimize the over_react builder to avoid unnecessary asset reads. Informal profiling in a large codebase that consumes over_react has shown in the best case a speed up on rebuilds from ~1 minute to ~2 seconds, and in the worst case no difference at all.
2.3.1 #
2.3.0 #
2.2.0 #
Complete
2.2.0
Changesets:
-
#249 Warn consumers about props / state mutation
- Directly mutating props and state is an antipattern and can cause unpredictable rendering. Avoiding this will be especially important for components to behave correctly in React 16's concurrent mode.
-
#255 Update for future compatibility with
react
5.0.0
2.1.0 #
Complete
2.1.0
Changesets:
- Dart 2
- Dart 1 (no changes)
-
#249 Warn consumers about props / state mutation
- Directly mutating props and state is an antipattern and can cause unpredictable rendering. Avoiding this will be especially important for components to behave correctly in React 16's concurrent mode.
-
#254 Add IDE snippets (WebStorm/IntelliJ and VSCode) for Dart2-only component boilerplate.
-
#253 Fix a bug that would cause a runtime exception for consumers that are leveraging the backwards-compatible component boilerplate when mixing in a
@PropsMixin
or@StateMixin
from this package. -
#256 Workaround a Dart Dev Compiler bug that affects private props/state members and classes.
-
#252 Workaround the following Dart Dev Compiler bug that results in incorrect behavior in certain scenarios when using uninitialized props/state fields: dart-lang/sdk#36052
-
#251 Update the builder's
auto_apply
option todependents
instead ofall_packages
. This means it will only run on packages that explicitly declare a dependency onover_react
, which makes more sense for the purpose of this builder and is more performant because it runs on fewer packages. -
#250 Fail CI if changes are detected after running a build via
pub run build_runner build
. This ensures that we don't forget to commit changes to generated files.
2.0.0 #
This release adds support for Dart 2 while retaining backwards-compatibility with Dart 1, but it requires changes to consumer's component code.
Note: If you intend to consume this version of over_react on Dart 1 and Dart 2 in the same codebase, do not remove the
transformers
section from yourpubspec.yaml
. This section is ignored on Dart 2, but will still be needed on Dart 1
Breaking Changes
-
In order to add support for Dart 2, consumers need to update their over_react component code! Please see our Dart 2 migration guide for more information.
We've created a codemod tool that will automatically update your code:
# On Dart 2.1.0 $ pub global activate over_react_codemod ^1.0.2 # If you need backwards-compatibility with Dart 1: $ pub global run over_react_codemod:dart2_upgrade --backwards-compat # Or, if you are okay with dropping Dart 1 support: $ pub global run over_react_codemod:dart2_upgrade
The tool (and additional info) can be found here: https://github.com/Workiva/over_react_codemod/
-
Removals:
getJsProps()
- usegetProps()
instead$Props
and$PropKeys
- see the migration guide above
1.33.2 #
1.33.1 #
- #272 Add
min-height: 0
toResizeSensor
wrapper nodes to fix issues with it not shrinking in a flexbox layout
1.33.0 #
- #266 Add
ErrorBoundary
ComponentThis component does not actually hook into any ReactJS 16 lifecycle yet. It won't until support for ReactJS 16 is added to react-dart in version 5.0.0, and to over_react in version 3.0.0.
1.32.0 #
- #249 Warn consumers about props / state mutation
- Directly mutating props and state is an antipattern and can cause unpredictable rendering. Avoiding this will be especially important for components to behave correctly in React 16's concurrent mode.
1.31.0 #
Deprecations
-
#230 Deprecate the following APIs (they will be removed in 2.0.0):
getJsProps()
- usegetProps()
instead.$Props
and$PropKeys
- see the Dart 2 migration guide for more information.
-
#207 Override
call()
instead ofnoSuchMethod()
in theUiProps
class. This was a requirement for Dart 2 compatibility, but also serves as an improvement - by no longer overridingnoSuchMethod()
, we will no longer be obscuring certain analyzer errors that should be seen by consumers.
1.30.2 #
Bug Fixes
- #222 Fix the initializer validation for component factories and the static
meta
field on props and state classes.
1.30.1 #
1.30.0 #
New Features
-
#196 Add
componentDefaultProps
getter toUiProps
for retrieving the immutable map view of a component's default props. This is an alternative to constructing aUiComponent
directly and callinggetDefaultProps()
, which will no longer work in Dart 2. -
#208 Add
typedDefaultPropsFor(factory)
utility function to easily obtain a typed view of the immutable default props for anyUiFactory
. This is effectively a strongly-typed version of the abovecomponentDefaultProps
getter.
Improvements
1.29.0 #
Bug fixes
- #197 Mount the rem-change-detecting node for a
ResizeSensor
asynchronously to prevent react from getting into a bad state
New Features
1.28.0 #
Bug fixes
- #193 Fix missing super calls in Flux component lifecycle methods that prevented disposal and prop validation
New Features
- #193:
Add hooks for Flux component redraws that occur in response to store updates:listenToStoreForRedraw
/handleRedrawOn
- Actually implemented via #195 in
1.29.0
- Actually implemented via #195 in
Improvements
1.27.0 #
1.26.2 #
Bug fixes
- 5fb73f Make rem change sensor container is
overflow:hidden
so it doesn't interfere with the page layout
1.26.1 #
Dependency Updates
- e8fc86 Loosen lower bound of
built_value
- built_value
>=4.6.1 <5.2.0
(was>=5.1.3 <5.2.0
)
- built_value
1.26.0 #
New Features
- #178: Automatic document root font-size change detection in Google Chrome to overcome https://bugs.chromium.org/p/chromium/issues/detail?id=429140
Dependency Updates
- 881c0c Tighten version constraints to speed up pub get
- analyzer
>=0.30.0+4 <=0.31.0
(was>=0.30.0 <=0.31.0
) - built_redux
^7.4.2
(was^7.4.1
) - built_value
>=5.1.3 <5.2.0
(was>=4.2.0 <5.2.0
) - js
^0.6.1+1
(was^0.6.0
) - logging
>=0.11.3+2 <1.0.0
(was>=0.11.3+1 <1.0.0
) - meta
^1.1.6
(was^1.0.4
) - path
^1.5.1
(was^1.4.1
) - react
^4.4.2
(was^4.4.1
) - source_span
^1.4.1
(was^1.4.0
) - transformer_utils
^0.1.5
(was^0.1.1
) - w_common
^1.13.0
(was^1.10.0
) - w_flux
^2.9.5
(was^2.7.1
) - platform_detect
^1.3.4
(was^1.3.2
) - quiver
>=0.25.0 <=0.28.0
(was>=0.21.4 <=0.28.0
)
- analyzer
Tech Debt
- #179: Update CI build
1.25.0 #
New Features
1.24.0 #
Dependency Updates
- #153 react
^4.3.0
(was^3.7.0
) - #151
- built_redux
^7.4.1
(was>=6.1.0 <8.0.0
) - built_value
>=4.2.0 <5.2.0
(was>=4.2.0 <6.0.0
)
- built_redux
New Features
- #154: Expose
react_dom.render
/react_dom.unmountComponentAtNode
from the react library
Tech Debt
- #151 Prepare for Dart 2 SDK
- Address Dart 2.x SDK lints / warnings that do not constitute breaking changes
- Address
DisposableManagerV6
deprecation UiProps
andUiState
now extend fromMapBase
1.24.1 #
Dependency Updates
- w_common
^1.10.0
(was^1.8.0
) - react
^4.4.1
(was^4.3.0
)
Tech Debt
- Address
ReactComponentFactory
deprecation - Address
findRenderedComponentWithType
deprecation
1.24.0 #
Dependency Updates
- #153 react
^4.3.0
(was^3.7.0
) - #151
- built_redux
^7.4.1
(was>=6.1.0 <8.0.0
) - built_value
>=4.2.0 <5.2.0
(was>=4.2.0 <6.0.0
)
- built_redux
New Features
- #154: Expose
react_dom.render
/react_dom.unmountComponentAtNode
from the react library
Tech Debt
- #151 Prepare for Dart 2 SDK
- Address Dart 2.x SDK lints / warnings that do not constitute breaking changes
- Address
DisposableManagerV6
deprecation UiProps
andUiState
now extend fromMapBase
1.23.1 #
Dependency Updates
- #149: Dependency Maintenance:
- Dart SDK now
>=1.24.2 <2.0.0
, was>=1.24.2
- Dependencies:
- analyzer now
>=0.30.0 <=0.31.0
, was>=0.30.0 <0.31.0
- barback now
>=0.15.2 <=0.15.2+14
, was^0.15.0
- quiver now
>=0.21.4 <=0.28.0
, was>=0.21.4 <0.26.0
- analyzer now
- Dev Dependencies:
- coverage now
>=0.7.2 <0.11.0
, was^0.7.2
- dependency_validator now
^1.1.0
, was^1.0.0
- mockito now
^2.0.0
, was^0.11.0
- test now
^0.12.32+1
, was^0.12.24
- coverage now
- Dart SDK now
1.23.0 #
Dependency Updates
- #145: Widen built_value version constraint: now
>=4.2.0 <6.0.0
, was^4.2.0
New Features
- #144: Move
BuiltReduxUiComponent
/BuiltReduxUiProps
out of @experimental- Warning: This will be deprecated in an upcoming release in favor of a different approach to creating a
built_redux
component.
- Warning: This will be deprecated in an upcoming release in favor of a different approach to creating a
1.22.0 #
1.21.0 #
1.20.2 #
1.20.1 #
1.20.0 #
1.19.0 #
1.18.1 #
1.18.0 #
1.17.0 #
1.16.2 #
Bug fixes
1.16.1 #
1.16.0 #
Dependency Updates
- w_common
^1.8.0
(was^1.6.0
) - w_flux
^2.9.0
(was^2.7.1
)
New Features
- #104: Update
UiComponent
to implementDisposableManagerV6
.
Improvements
- #103:
FluxUiComponent
redraws only once when store triggers along with ancestor rerender.
Tech Debt
- #105: Add warning for incorrect usage of
getDartComponent
.
1.15.1 #
Tech Debt
- #97: Improve some documentation comments.
- #95: Move internal test utils to over_react_test, and consume them.
1.15.0 #
New Features
- #88: Add
validateProps
method toUiComponent
- Will automatically validate props annotated with
@requiredProp
withincomponentWillMount
andcomponentWillReceiveProps
- Will automatically validate props annotated with
Tech Debt
Misc
- #73: Add callout for the OverReact Snippet VS Code Extension
1.14.0 #
Dependency Updates
- react
^3.4.3
(was^3.4.1
) - w_common
^1.6.0
(new)
New Features
- #91: Implement
DisposableManagerV3
forUiComponent
- Assists with cleaning up streams and other data structures that won't necessarily be garbage collected without some manual intervention.
Misc
- #92: Update prop error message to make it more DDC friendly
1.13.0 #
1.12.1 #
1.12.0 #
Strong Mode / Dart Dev Compiler
- #81: Make transformer output strong mode clean.
- Closes #14
- #82: Implement workarounds necessary to make OverReact-based code able to be compiled by the Dart Dev Compiler ("DDC").
- See new transformer options documentation for more information.
1.11.1 #
Bug Fixes
- Revert #77: Update
FluxUiComponent
subscriptions when newprops
are received.- Reverted since this broke subclasses that weren't calling super in lifecycle methods
componentWillReceieveProps
andcomponentDidUpdate
- Keep
@mustCallSuper
annotations from this changeset
- Reverted since this broke subclasses that weren't calling super in lifecycle methods
1.11.0 #
New Features
Bug Fixes
- #77: Update
FluxUiComponent
subscriptions when newprops
are received.
Tech Debt Paid
- #75: Audit the lib for any memory leak sources, and fortify it against future ones.
Misc
- #72: Add logging message when a race condition causes
BatchedRedraws
to mount aFluxUiComponent
asynchronously after thestore
has already been disposed.- Thanks @tomconnell-wf!
1.10.0 #
Improvements
- #69: New top-level
getSelectionStart
function to normalizeselectionStart
across browsers for bothTextInputElement
s andTextAreaElement
s
Tech Debt Paid
1.9.2 #
1.9.1 #
Bug Fixes
- #66: Fix regression with transitions not completing in consumers of
AbstractTransitionComponent
that don't callsuper.componentDidMount
1.9.0 #
1.8.0 #
Bug Fixes
1.7.0 #
Deprecations
- #51: Deprecate the
@Required()
annotation since it conflicts with themeta
package. Replaced by:-
arguments to the
Accessor
annotation:@Accessor(isRequired: true, isNullable: true, requiredErrorMessage: 'foo')
-
shorthand aliases:
@requiredProp
/@nullableRequiredProp
-
Bug Fixes
- #52: Eliminate dart2js warnings on component props classes
1.6.0 #
- #48: Improved
getProps()
functionality.- Allows you to traverse wrapper components by setting the named parameter
traverseWrappers
totrue
.
- Allows you to traverse wrapper components by setting the named parameter
1.5.0 #
Improvements
- #46: Add
ResizeSensorProps.quickMount
flag for better performance when sensors are mounted often - Make
getProp
,getProps
, andmodifyProps
conditional based on the named parametershouldAdd
/shouldModify
.
Dependency Updates
- Add missing quiver dependency (now depends on quiver
>=0.21.4 <0.25.0
) - Broaden analyzer dependency range to
>=0.26.1+3 <0.30.0
(was>=0.26.1+3 <0.28.0
)
1.4.0 #
#40: Sync changes from original private repo library
This is the last time we'll do this - as the original library has now been completely switched over to use
over_react
-
Switched dependency from
browser_detect
to our newplatform_detect
library! -
Improved
toString
method ofDebugFriendlyConstant
. -
Improved
setSelectionRange
polyfill to avoid https://github.com/dart-lang/sdk/issues/22967 -
Added typedef for
ElementCallback
andResizeSensorHandler
. -
Added
newStyleFromProps
utility function. -
Added
getPropKey
utility function.- Allows you to get a namespaced prop key dynamically!
Miscellaneous
1.3.0 #
React JS Upgrade
- #31: Upgrade to
React JS
15.4.x
via react-dart3.1.0
. - #27: Add missing SVG elements
(e.g.
Dom.foreignObject
pointed out by @kasperpeulen)
We are now on Gitter!
- #33: Implement vehicle for community discussion (on Gitter). Thanks for the suggestion @jtrunick!
1.2.0 #
Strong Mode
- #15: Make
over_react
code "strong mode" compliant!- We will be working in the near future to make the code generated by our transformer compliant as well.
Dependency Updates
Bug Fixes
- #17: Add missing
browser_detect
dependency.- Thanks @denniskaselow!
Documentation
- #16: Fix typos in readme.
- Thanks @denniskaselow / @johncblandii!
- #20: Improve PR / Issue templates.
1.1.1 #
1.1.0 #
1.0.2 #
- #5: Add some Bootstrap UI components to
web/
to demonstrate what can be built using OverReact.
1.0.1 #
- Add test coverage for the
constants
,dom_util
,guid_util
andevent_helpers
libraries.
1.0.0 #
Initial public release of the library.