over_react 5.0.1 copy "over_react: ^5.0.1" to clipboard
over_react: ^5.0.1 copied to clipboard

Platformweb

A library for building statically-typed React UI components using Dart.

OverReact Changelog #

5.0.1 #

  • Consume over_react_test 3.0.0

5.0.0 #

  • Migrate to null safety
  • Support generating code for null-safe libraries (while retaining support for non-null-safe libraries)
  • Add ability to declare required, optionally-non-nullable props and state fields using Dart's late keyword (AKA "late required props")
    • Stay tuned for fully baked null safety documentation for this library!

Analyzer plugin

  • Add new lint, over_react_required_prop (#896)
    • Warns for missing late required props
    • Supports linting for missing @requiredProp required props (these are deprecated in favor of late), but this is disabled by default
  • Add new lint, over_react_unsafe_required_prop_access, that warns when accessing required props on potentially incomplete maps
  • Reinstate functionality that had to be disabled in over_react 4.8.3 since it wasn't fully null-safe
    • Lints (AKA diagnostics)
      • over_react_boilerplate_error, over_react_boilerplate_warning
      • over_react_incorrect_doc_comment_location
    • Assist for toggling class component statefulness
  • Update diagnostics, fixes, and assists to work on null-safe code, add null-safe test cases

API additions #

  • Add members to UiProps to support late required props (stay tuned for more documentation on these)
    • Extension methods: getPropKey, containsProp, getRequiredProp(OrNull)
    • disableRequiredPropValidation
    • Internal use only: validateRequiredProps, requiredPropNamesToSkipValidation
  • Add createContextInit for creating contexts with non-nullable values
  • Add isLate field to PropDescriptor and StateDescriptor

Breaking changes #

  • Deprecated API removals:
    • BuiltReduxUiComponent, BuiltReduxUiProps
    • package:over_react/experimental.dart (only exported built_redux APIs)
    • forwardRef (not to be confused with uiForwardRef)
    • The displayName argument of registerComponent and registerComponent2
  • The following props classes can no longer be extended or instantiated directly (like most components). To instantiate them, use the factory instead.
    • FragmentProps
    • StrictModeProps
    • ReduxProviderProps (for extension, mix in ReduxProviderPropsMixin instead)
    • ProviderProps (factory: Context.Provider)
    • ConsumerProps (factory: Context.Consumer)
  • The following props are now required:
    • FluxUiPropsMixin.actions, FluxUiPropsMixin.store
    • ProviderProps.value (ProviderProps is the return type of Context.Provider)
    • ReduxMultiProviderProps.storesByContext
    • ReduxProviderProps.store
  • UiPropsMapView (deprecated)
    • is now abstract and requires subclasses to override selfFactory
    • now extends directly from UiProps, and longer implements MapView (it still implements Map)
    • props now returns the backing map instead of this
  • react_dom.render arg loosened from ReactElement to dynamic
  • Other changes that we don't expect to affect consumers:
    • PropsMeta/StateMeta constructor arguments fields and keys are now required
    • ProviderProps.props type has been widened from JsMap to Map (now matches ConsumerProps and other props classes)
    • ConnectPropsMixin now implements UiProps (the one exported from package:over_react/over_react.dart) instead of UiProps's superclass of the same name, component_base.UiProps.

4.11.1 #

  • #881 Fix disableRequiredPropValidation annotation and add test

4.11.0 #

  • #879 Backpatch @Props(disableRequiredPropValidation) annotation arg

4.10.4 #

  • #853 Allow react 7 and w_flux 3

4.10.3 #

  • #846 Update internals to prepare for react-dart 7.0.0

4.10.2 #

  • #835 Upgrade dependencies, notably jumping to analyzer 5.x
    • analyzer: ^5.1.0 (was >=1.7.2 <3.0.0)
    • dart_style: ^2.0.0 (was >=1.2.5 <3.0.0)
    • w_common: ^3.0.0 (was >=2.0.0 <4.0.0)

4.10.0 #

  • #829 Add improved prop forwarding methods (UiProps.getPropsToForward/.addPropsToForward)
  • #809, #826, #827 Example app dependency updates

4.9.1 #

  • #824 Update 3rd party dependencies

4.9.0 #

  • #820 Add Suspense Component
  • #819 More dependency updates

4.8.5 #

  • #815 Dependency updates: dart_dev: '>=3.0.0 <5.0.0'
  • #816 Dependency updates: w_common: '>=2.0.0 <4.0.0'

4.8.4 #

  • 4.8.3 was missing the analyzer plugin in the published package for some reason, and this release should hopefully include it again.

4.8.3 #

  • #807 Allow analyzer 2.x, fix analyzer plugin not starting in newer SDKs

4.8.2 #

  • #804 Dependencies: raise analyzer to ^1.7.2, unpin meta
  • #805 Internal CI and dev_dependencies updates

4.8.1 #

  • #802 Raise platform_detect upperbound to allow 2.x
  • #800 (Docs) Add Redux DevTools integration documentation

4.8.0 #

  • #797 Add overReactReduxDevToolsMiddlewareFactory for constructing middleware with a name, allowing store instances to be separated in the Redux Dev Tools

4.7.0 #

  • #795 Add jsifyMapListProp and unjsifyMapListProp conversion utils

4.6.0 #

Analyzer Plugin

  • #788 Add new over_react_hooks_exhaustive_deps diagnostic that validates the dependency lists of React hooks such as useEffect, useMemo, and useCallback.

    Ported/forked from the JS eslint-plugin-react-hooks react-hooks/exhaustive-deps rule (info from the React docs, package, source), this Dart diagnostic aims to provide parity with the dev experience of the JS lint rule, with some tweaks to work better with Dart and over_react's flavor of React APIs.

4.5.0 #

  • #785 Add utilities for jsifying/unsifying context props

4.4.4 #

  • #782 w_common v2 rollout (part 1)
  • #783 w_common v2 rollout (part 2)

4.4.3 #

  • #774 Make error message when component failed to initialize more helpful
  • #778 Allow w_common 2

4.4.2 #

4.4.1 #

  • #764 (Example app) Widen uuid dependency

4.4.0 #

  • #743 Add js_component.dart entrypoint with utilities for wrapping JS React components. More in-depth documentation around how to use these APIs and best practices is coming soon.

Analyzer Plugin

  • Fix diagnostics not working in Dart >=2.13, by upgrading to analyzer_plugin 0.6.0
  • Diagnostics can be configured with custom severity, including disabling them (docs)
  • New diagnostics:
    • over_react_create_ref_usage - Warns when using createRef in a function component instead of useRef
    • over_react_non_defaulted_prop - Warns when using a prop in a function component instead of a local variable that defaults the prop
    • over_react_rules_of_hooks - Warns when calling hooks conditionally or using hooks outside of function components or custom hook functions
    • over_react_style_camel_case - Warns when using non-camelCased keys in style maps, which get ignored by React
  • New assists:
    • Convert between function and class component syntax (only moves code around and doesn't migrate lifecycle methods, state, hooks, etc.)
  • Improvements to existing features:
    • over_react_invalid_render_return_type - Update to work with function components
    • over_react_duplicate_prop_cascade - Fix duplicate DOM props not linting in certain cases
    • "Add ref" assist and ref object quick fixes - Update to work with function components
  • Migrate most code to null safety, fix several potential null errors
  • Improve test coverage

4.3.1 #

  • #736 Raise dependency upper bounds to allow analyzer 1.x, built_redux 8.x, dart_style 2.x, and quiver 3.x

4.3.0 #

  • #742 Update AriaPropsMixin
  • #737 Temporarily disable the mockito builder for better build perf
  • #741 Replace deprecated commands with new dart commands

4.2.9 #

  • #733 Update SafeRenderManager to not be retained by the React tree it renders, to aid in memory leak testing. Outside of that context, this change has negligible effects.

4.2.8 #

  • #729 Raise built_value lower bound to ^8.0.0

4.2.7 #

  • #730 Fix bug where components using the React Redux useSelector and createSelectorHook hook APIs would rerender on every store update, even when there were no changes to selected values

4.2.6 #

  • #722 Dependency upgrades

4.2.5 #

  • #720 Auto-tear-down ConnectFluxAdapterStores when backing Flux stores dispose
  • Bump react lower bound to 6.1.4

Internal Tech Debt:

  • Dev dependencies: remove dart2_constant, update test_html_builder and dependency_validator to latest
  • CI: Don't run main build in Dart 2.14 until we can upgrade pkg:analyzer and get it passing again
  • CI: Fix analyzer plugin build

4.2.4 #

  • #710 Support type-checking directly from the UiFactory to better support JS components

4.2.3 #

  • #708 Add 2.13.4 to CI matrix
  • #709 Raise the Dart SDK minimum to at least 2.11.0

4.2.2 #

  • Reinstate null-aware isDisposedOrDisposing (removed in #703/4.2.1) to support tests with mocked stores

4.2.1 #

  • #703 Improve FluxUiComponent logging when attempting to subscribe to a disposed store

4.2.0 #

  • #701 Add elementType convenience getter to UiFactory, Change meta dependency lower-bound to 1.1.6 to prevent dependency gridlock (missed in #695).

4.1.3 #

  • #698 Conditionally unconvert style and children props

4.1.2 #

  • #689 Copy language version comments to generated part files
  • #695 Widen Dependency Ranges Blocking Dart 2.13

4.1.1 #

  • #685 Remove deprecated authors field from pubspec.yaml
  • #691 Enable resolution of build_web_compilers 2.12.0, fix Dart stable build

4.1.0 #

  • #679 Update boilerplate to be compatible with Dart >=2.9.0.

    This introduced a new component factory syntax that future proofs the boilerplate syntax through Dart 2.12! For more information and migration instructions, refer to the PR description.

  • #674 Add Redux hooks.

    Introducing new Redux hook APIs! OverReact consumers also using OverReact Redux can now use the useDispatch, useSelector, and useStore hooks. For more information, refer to the documenation.

  • #655 Add the capability to configure ComponentTypeMeta on functional components via setComponentMeta.

    Those who used class based components were accustomed to being able to modify meta data by using the @Component2() annotation. Previously, there was no way to do this on functional components. However, the new setComponentMeta API fixes this and allows for similar capabilities on functional components.

4.0.0 #

This stable, major release of over_react includes:

ReactJS 17.x Support #

The underlying .js files provided by this package are now ReactJS version 17.0.1.

Full List of Breaking Changes

3.12.1 #

  • #643 Use propsOrStateMapsEqual in memo so that function tearoffs don't cause unnecessary rerenders.

3.12.0 #

  • #641 Expose new event helper APIs. In react-dart, using the SyntheticEvent class constructors were deprecated. New event helpers were added as a replacement, and to make their usage convenient, these helpers have been exposed directly via OverReact.

3.11.0 #

3.10.1 #

  • #500 Improve error messages for boilerplate-related issues
    • This notably includes major improvements to build/analyzer errors for function components

3.10.0 #

  • #621 Add WithTransition wrapper component to enable "controlled" transitions using props
  • #628 Fix Redux dev tools middleware console logging when hierarchicalLoggingEnabled is false

3.9.0 #

  • #620 Fix issue where uiForwardRef/memo components were being passed JSified props (by consuming react-dart's forwardRef2/memo2)
  • #618 Add makeMapStateToProps/etc. arguments to connect to enable creation of closures specific to component instances
  • #625 Address analyzer lints / hints

3.8.1 #

Bug Fixes

  • #623 Include deprecation annotations on legacy props mixins

Other Changes

  • #487 Readme Improvements
  • #619 Redux example app: Replace deprecated ExpansionPanel with new Accordion from MaterialUi

3.8.0 #

New Features

  • 🎉 🎉 🎉 Support for function components, memo and hooks!!! 🎉 🎉 🎉

    Sooooo much work from so many amazing people made this possible, but to summarize:

    • #606 Add support for function components
    • #613 Add support for memo higher order component
    • #611 Hooks, hooks, and more hooks!
      • useState
      • useCallback
      • useContext
      • useEffect
      • useLayoutEffect
      • useReducer
      • useRef
      • useMemo
      • useImperativeHandle
      • useDebugValue


    It works like this...

    Define the component

    mixin FancyBorderProps on UiProps {
      String color;
    }
    
    UiFactory<FancyBorderProps> FancyBorder = uiFunction(
      (props) {
        // props is typed as a `FancyBorderProps`
        // whatever you return here will be rendered
        return (Dom.div()..className = 'fancy-border border-${props.color}')(
          props.children,
        );
      },
      $FancyBorderConfig, // ignore: undefined_identifier
    );
    

    Render the component (exact same consumer API as a class-based component):

    import 'package:over_react/over_react.dart';
    import 'fancy_border.dart'; // Where your component is defined
    
    main() {
      final renderedWidget = (FancyBorder()..color = /* some color value */)(
        // put some children here!
      );
    
      react_dom.render(renderedWidget, querySelector('#idOfSomeNodeInTheDom'));
    }
    

Other Changes

  • #612 Deprecate forwardRef / add uiForwardRef as its replacement

3.7.0 #

Library Changes:

  • #499 Add PureComponentMixin
  • #462, #608 Redux connect performance optimizations
  • #501 Add code snippet for Redux connected components

Analyzer Plugin Changes:

  • #603 Add tests for "toggle stateful" assist
  • #604 Restore analyzer plugin Git history

3.6.0 #

  • Add OverReact Analyzer Plugin (beta) ⚡️

    A Dart analyzer plugin for OverReact, bringing analysis-time checks and behavior to IDEs using the Dart Analysis Server (including JetBrains IDEs and VS Code).

    Functionality includes checking for issues that cause React warnings/errors at runtime, linting for best practices, adding "assists" for common edits to component syntax and boilerplate, and more!

  • #498 Fix missing allowInterop call in OverReactReduxDevToolsMiddleware.handleEventFromRemote

  • Documentation updates

    • #489 Docs: Update FluxUiPropsMixin example
    • #492 Docs: Note that props can only be declared in mixins

3.5.3 #

  • #496 Emit a build error for mismatched components in the new boilerplate

3.5.2 #

  • #494 Widen analyzer range to include 0.39.x

3.5.1 #

  • #488 Add missing _ to factory assignment in boilerplate snippets
  • #490 Allow static members in concrete props/state classes in new, mixin-based boilerplate

3.5.0 #

  • Introduce new and improved component boilerplate syntax 🎉

    side-by-side comparison of old and new boilerplate for a simple component

    See our migration guide for more information around these changes, including why we made them and how to convert existing components to use thew new syntax.

    The existing boilerplate syntax will be deprecated in a future release.

  • #469 Throw helpful error when connect, connectFlux, and forwardRef are passed an invalid component.

3.4.1 #

  • #468 Allow redux.dart version 4

3.4.0 #

  • #459 Add support for connected components that use w_flux stores and actions.

3.3.0 #

  • connect/forwardRef HOC type checking:
    • Fix error when passing ReactElements of these HOCs into isComponentOfType
    • Treat HOC types as subtypes of the components they wrap, as expected.

3.2.1 #

  • #461 Fix accidental jsification of Map/Function Dart props in certain cases when using connect

3.2.0 #

  • #439 Add over_react_redux example app
  • #447 Add StrictMode component
  • #452 Add built_redux to Redux transition Docs
  • #453 Fix rem measurement bug

3.1.7 #

  • #435 Fix issue with ErrorBoundary that causes errors thrown within the render phase of the component lifecycle to bubble up to parent ErrorBoundary components, which resulted in entire consumer applications locking up / crashing / unmounting.
    • DEPRECATIONS: ErrorBoundaryMixin, ErrorBoundaryPropsMixin and ErrorBoundaryStateMixin are deprecated and will be removed in the 4.0.0 release.
      • To create a custom error boundary moving forward, create an HOC that wraps around the ErrorBoundary component instead.
  • #433 Refactor propTypes tests
  • #440 Make over_react_redux tests compatible with version ^7.1.1 of the redux JS library
  • #442 Remove Dart 2.4.1 phase from the CI build
  • #428 Add examples of components that have render methods that return Fragment, List, num and String

3.1.6 #

  • Remove dead code in UiProps.build that was unnecessarily slowing down dart2js compilation
  • Fix README typos

3.1.5 #

  • Fix ErrorBoundary infinite loop when multiple errors are thrown at the same time during remount
  • Fix connect's mapStateToOwnPropsWithProps not getting called

3.1.4 #

  • Replace usage / mention of UiComponent2.getPropKey which had to be deprecated in the 3.1.2 release.
  • Add a stub for UiComponent2.redraw with a deprecated annotation so that consumers would correctly see it as being deprecated.
    • Previously, this method would not show up as deprecated because certain IDEs would default to the base implementation (Component.redraw) - instead of the newer, deprecated Component2.redraw.

3.1.3 #

  • Fixes an issue that prevents UiComponent instances from being declared as sub-types of UiComponent2 instances via the subtypeOf argument in a Component2() annotation.

3.1.2 #

  • Restore the public getPropKey function that was accidentally made private in the 3.1.0 release.

3.1.1 #

  • Restore the xmlLang, xmlSpace, y1, y2, y members that were accidentally removed from SvgProps in the 3.1.0 release.

3.1.0 #

Full React JS 16.x Component Lifecycle Support #

  • The new UiComponent2 classes replace the now deprecated UiComponent 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!

        React DevTools with Component2

    • Easier to maintain
    • Easier integration with JS libs
    • 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 an ErrorBoundaryMixin that you can use as a starting point to build your own custom error boundary component!

Learn more about upgrading to UiComponent2

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 UiComponents to UiComponent2 and importing package:over_react/over_react_redux.dart!
  • We've even got some sweet redux dev tools you can use to make the inspection of connected state a breeze! over_react_redux.dart developer tools

Learn more about using over_react_redux.dart

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 a ReactFragment (multiple children) or other values like strings and lists instead of just a single ReactElement.

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!

Full list of 3.1.0 Changes

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:

3.0.1 #

  • Lower the Dart SDK lower-bound to 2.4.0. It was accidentally raised to 2.4.1 in the 3.0.0 release.

Complete 3.0.1 Changesets:

3.0.0 #

ReactJS 16.x Support

Complete 3.0.0 Changesets:

Full List of Breaking Changes

2.7.0 #

Complete 2.7.0 Changsets:

  • This release brings in the SafeRenderManager utilities added to the 3.x alpha line-of-release via #390

2.7.0 #

Complete 2.7.0 Changsets:

  • This release brings in the SafeRenderManager utilities added to the 3.x alpha line-of-release via #390

2.6.1 #

Complete 2.6.1 Changsets:

2.6.0 #

Complete 2.6.0 Changsets:

  • Adds a placeholder prop API to mirror the 3.x ErrorBoundary APIs (#370) added to configure logging. The API is not wired up in 2.x, but will make the transition for consumers to 3.x smoother.

2.5.3 #

Complete 2.5.3 Changsets:

  • #363 Dart 2 Widen analyzer dependency range

2.5.2 #

Complete 2.5.2 Changesets:

  • #333 Expand upper-bound of quiver dependency to <3.0.0

2.5.1 #

Complete 2.5.1 Changesets:

  • Increase Dart SDK dependency lower-bound to 2.4.0

2.5.0 #

Complete 2.5.0 Changesets:

  • #327 Add support for SyntheticAnimationEvent / SyntheticTransitionEvent

2.4.4 #

Complete 2.4.4 Changesets:

  • #310 Upgrade to dart 2.4, analyzer 0.36.x, and build_web_compilers 2.x

2.4.3 #

Complete 2.4.3 Changesets:

  • #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 deprecated jsify, getProperty and setProperty members.
  • #294 Fix issue with AbstractTransitionComponent that causes ReactJS setState warnings to appear in the browser console.

2.4.1 #

Complete 2.4.1 Changesets:

  • #281 Upgrade to analyzer ^0.35.0.

2.4.0 #

Complete 2.4.0 Changesets:

  • #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 #

Complete 2.3.1 Changesets:

  • #272 Add min-height: 0 to ResizeSensor wrapper nodes to fix issues with it not shrinking in a flexbox layout

2.3.0 #

Complete 2.3.0 Changesets:

  • #266 Add ErrorBoundary Component

    This 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.

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:

  • #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 to dependents instead of all_packages. This means it will only run on packages that explicitly declare a dependency on over_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 #

Complete 2.0.0 Changeset

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 your pubspec.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() - use getProps() instead
    • $Props and $PropKeys - see the migration guide above

1.33.2 #

  • #292 Update react dependency to version ^4.7.0, and remove references to deprecated jsify, getProperty and setProperty members.
  • #294 Fix issue with AbstractTransitionComponent that causes ReactJS setState warnings to appear in the browser console.

1.33.1 #

  • #272 Add min-height: 0 to ResizeSensor wrapper nodes to fix issues with it not shrinking in a flexbox layout

1.33.0 #

Complete 1.33.0 Changeset

  • #266 Add ErrorBoundary Component

    This 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 #

Complete 1.32.0 Changeset

  • #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 #

Complete 1.31.0 Changeset

Deprecations

  • #230 Deprecate the following APIs (they will be removed in 2.0.0):

    • getJsProps() - use getProps() instead.
    • $Props and $PropKeys - see the Dart 2 migration guide for more information.
  • #207 Override call() instead of noSuchMethod() in the UiProps class. This was a requirement for Dart 2 compatibility, but also serves as an improvement - by no longer overriding noSuchMethod(), we will no longer be obscuring certain analyzer errors that should be seen by consumers.

1.30.2 #

Complete 1.30.2 Changeset

Bug Fixes

  • #222 Fix the initializer validation for component factories and the static meta field on props and state classes.

1.30.1 #

Complete 1.30.1 Changeset

Bug Fixes

  • #220 Fix an issue for Dart 2 compatibility with how the transformer handles props and state mixins that have generic type parameters.

Tech-Debt

  • #219 Remove dart:mirrors usages from tests (necessary for Dart 2 compatibility).

Documentation

1.30.0 #

Complete 1.30.0 Changeset

New Features

  • #196 Add componentDefaultProps getter to UiProps for retrieving the immutable map view of a component's default props. This is an alternative to constructing a UiComponent directly and calling getDefaultProps(), 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 any UiFactory. This is effectively a strongly-typed version of the above componentDefaultProps getter.

Improvements

  • #200 #201 #205 #208 Update the transformer to support new over_react component boilerplate that is compatible with both Dart 1 and Dart 2. This is the first step towards Dart 2 compatibility. For more information, see #210.

1.29.0 #

Complete 1.29.0 Changeset

Bug fixes

  • #197 Mount the rem-change-detecting node for a ResizeSensor asynchronously to prevent react from getting into a bad state

New Features

  • #195: Add hooks for Flux component redraws that occur in response to store updates: listenToStoreForRedraw/handleRedrawOn
    • Implements the stuff that was missed in #193

1.28.0 #

Complete 1.28.0 Changeset

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

Improvements

  • #192: Make return type of getDartComponent generic
  • #190: Merge style prop into styles applied to the top-level ResizeSensor node

1.27.0 #

Complete 1.27.0 Changeset

New Features

  • #187: New ResizSensorProps.onDetachedMountCheck prop callback and ResizeSensorComponent.forceResetDetachedSensor method

Improvements

  • #188: Use isNotEmpty instead of length == 0 check
    • Thanks @teresy!!!

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)

1.26.0 #

Complete 1.26.0 Changeset

New Features

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)

Tech Debt

  • #179: Update CI build

1.25.0 #

Complete 1.25.0 Changeset

New Features

  • #167: New ClassNameBuilder.merge method and ClassNameBuilder.merged constructor.
  • #168: Expose react_wrappers library that was previously only available via a src/ import.

1.24.0 #

Complete 1.24.0 Changeset

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)

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 and UiState now extend from MapBase

1.24.1 #

Complete 1.24.1 Changeset

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 #

Complete 1.24.0 Changeset

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)

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 and UiState now extend from MapBase

1.23.1 #

Complete 1.23.1 Changeset

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
    • 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

1.23.0 #

Complete 1.23.0 Changeset

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.

1.22.0 #

Complete 1.22.0 Changeset

New Features

  • #142: Do not execute prop validation logic in dart2js code

1.21.0 #

Complete 1.21.0 Changeset

New Features

  • #140: Add an option to make BuiltReduxUiComponent "pure"

1.20.2 #

Complete 1.20.2 Changeset

Tech Debt

  • #137: Get rid of dart2js compiler warnings

1.20.1 #

Complete 1.20.1 Changeset

Misc

  • #133: Update logger name standard.

1.20.0 #

Complete 1.20.0 Changeset

New Features

  • #128: Add UiPropsMapView.

Misc

  • #129: Add CODEOWNERS file.

1.19.0 #

Complete 1.19.0 Changeset

Dependency Updates

  • #126: Update minimum Dart SDK version to 1.24.2.

New Features

  • #118: Add BuiltReduxUiComponent and BuiltReduxUiProps.
    • These classes are considered unstable and can be imported via import "package:over_react/experimental.dart";

Tech Debt

  • #126: Use dependency_validator.

1.18.1 #

Complete 1.18.1 Changeset

Bug fixes

  • Fix regression in prop_mixins.dart introduced by #119.

1.18.0 #

Complete 1.18.0 Changeset

Improvements

  • #177: Improve error message when UiState classes aren't set up properly.

New Features

  • #119: More convenient ubiquitous access of DOM/aria props.
  • #120: Transition in/out-specific config, test attributes.

1.17.0 #

Complete 1.17.0 Changeset

New Features

  • #115: Add 4-argument callback utils

1.16.2 #

Complete 1.16.2 Changeset

Bug fixes

  • #110: Revert bugfixes that can cause FluxUiComponent rendering regressions:
    • #108: Fix case where setState and store trigger only result in one FluxUiComponent render
    • #103: FluxUiComponent redraws only once when store triggers along with ancestor rerender.

1.16.1 #

Complete 1.16.1 Changeset

Bug fixes

  • #108: Fix case where setState and store trigger only result in one FluxUiComponent render

1.16.0 #

Complete 1.16.0 Changeset

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 implement DisposableManagerV6.

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 #

Complete 1.15.1 Changeset

Tech Debt

  • #97: Improve some documentation comments.
  • #95: Move internal test utils to over_react_test, and consume them.

1.15.0 #

Complete 1.15.0 Changeset

New Features

  • #88: Add validateProps method to UiComponent
    • Will automatically validate props annotated with @requiredProp within componentWillMount and componentWillReceiveProps

Tech Debt

  • #94: Address deprecations from package:test
  • #98: Fix misleading typo in overridden parameter name

Misc

1.14.0 #

Complete 1.14.0 Changeset

Dependency Updates

  • react ^3.4.3 (was ^3.4.1)
  • w_common ^1.6.0 (new)

New Features

  • #91: Implement DisposableManagerV3 for UiComponent
    • 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 #

Complete 1.13.0 Changeset

Dependency Updates

  • #89: quiver >=0.21.4 <0.26.0 (was >=0.21.4 <0.25.0)

New Features

  • #87: Make DomProps/SvgProps implement UiProps for more convenient DDC typing

Misc

  • #86: Get tests passing using the DDC
  • #83: Use over_react_test

1.12.1 #

Complete 1.12.1 Changeset

Bug fixes

  • Bump min source_span to version w/ SourceFile.fromString

1.12.0 #

Complete 1.12.0 Changeset

Strong Mode / Dart Dev Compiler

  • #81: Make transformer output strong mode clean.
  • #82: Implement workarounds necessary to make OverReact-based code able to be compiled by the Dart Dev Compiler ("DDC").

1.11.2 #

Complete 1.11.2 Changeset

Bug Fixes

  • e805b7: Null-coalesce isDisposedOrDisposing to ease consumer test breakages.

1.11.1 #

Complete 1.11.1 Changeset

Bug Fixes

  • Revert #77: Update FluxUiComponent subscriptions when new props are received.
    • Reverted since this broke subclasses that weren't calling super in lifecycle methods componentWillReceieveProps and componentDidUpdate
    • Keep @mustCallSuper annotations from this changeset

1.11.0 #

Complete 1.11.0 Changeset

New Features

Bug Fixes

  • #77: Update FluxUiComponent subscriptions when new props 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 a FluxUiComponent asynchronously after the store has already been disposed.
    • Thanks @tomconnell-wf!

1.10.0 #

Complete 1.10.0 Changeset

Improvements

  • #69: New top-level getSelectionStart function to normalize selectionStart across browsers for both TextInputElements and TextAreaElements

Tech Debt Paid

  • #68: Declare explicitly-used transitive imports in pubspec.yaml
  • #70: Don't run ValidationUtil-related tests in dart2js

1.9.2 #

Complete 1.9.2 Changeset

Dependency Updates

  • analyzer >=0.26.1+3 <0.31.0 (was >=0.26.1+3 <0.30.0)

1.9.1 #

Complete 1.9.1 Changeset

Bug Fixes

  • #66: Fix regression with transitions not completing in consumers of AbstractTransitionComponent that don't call super.componentDidMount

1.9.0 #

Complete 1.9.0 Changeset

Improvements

  • #60: Provide easy access to DOM node in ValidationUtil.warn messages
  • #61: Export some react library members and add capturing event handlers
    • Export setClientConfiguration and ReactElement
    • Export all Synthetic*Event classes
    • Add capturing event handlers supported by ReactJS

Bug Fixes

  • #58: Fix issue with the transitionend warning (added via #55) sometimes firing when it shouldn't
  • #59: Ensure AbstractTransitionComponent does not call setState while in the process of unmounting
    • Thanks @joshbeam-wf!!!
  • #65 Work around Dart 1.23 strong mode issue with MapViewMixin

1.8.0 #

Complete 1.8.0 Changeset

Bug Fixes

  • #54: Fix strong mode warning
  • #55: Fix issue with AbstractTransitionComponent causing components to hang when the transitionend event never fires.

1.7.0 #

Complete 1.7.0 Changeset

Deprecations

  • #51: Deprecate the @Required() annotation since it conflicts with the meta 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 #

Complete 1.6.0 Changeset

  • #48: Improved getProps() functionality.
    • Allows you to traverse wrapper components by setting the named parameter traverseWrappers to true.

1.5.0 #

Complete 1.5.0 Changeset

Improvements

  • #46: Add ResizeSensorProps.quickMount flag for better performance when sensors are mounted often
  • Make getProp, getProps, and modifyProps conditional based on the named parameter shouldAdd/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 #

Complete 1.4.0 Changeset

#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 new platform_detect library!

  • Improved toString method of DebugFriendlyConstant.

  • Improved setSelectionRange polyfill to avoid https://github.com/dart-lang/sdk/issues/22967

  • Added typedef for ElementCallback and ResizeSensorHandler.

  • Added newStyleFromProps utility function.

  • Added getPropKey utility function.

    • Allows you to get a namespaced prop key dynamically!

Miscellaneous

  • #28: Run unit tests in dart2js on CI
  • #37: Update formatting guidelines WRT dartfmt and trailing commas

1.3.0 #

Complete 1.3.0 Changeset

React JS Upgrade

We are now on Gitter!

1.2.0 #

Complete 1.2.0 Changeset

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

  • #23: Update minimum Dart SDK version to 1.19.1.
  • #15: Update minimum react package version to 3.0.1.

Bug Fixes

Documentation

1.1.1 #

Complete 1.1.1 Changeset

  • #6: Add contributor documentation.
  • #7: Allow "unsupported" units to be passed to the toRem and toPx functions.

1.1.0 #

Complete 1.1.0 Changeset

New Features

  • #10: Add FluxUiComponent and FluxUiStatefulComponent.
    • Enables consumers to build UI components with a uni-directional data flow via the w_flux library.

Misc

  • #8: Add a stateful UI component demo.
  • #9: Fix CI build fragility.

1.0.2 #

Complete 1.0.2 Changeset

  • #5: Add some Bootstrap UI components to web/ to demonstrate what can be built using OverReact.

1.0.1 #

Complete 1.0.1 Changeset

  • Add test coverage for the constants, dom_util, guid_util and event_helpers libraries.

1.0.0 #

Initial public release of the library.