ReduxMultiProvider top-level property

  1. @Factory()
UiFactory<ReduxMultiProviderProps> ReduxMultiProvider
getter/setter pair

An HOC that can be used to wrap a component tree with multiple ReduxProviders without manually nesting providers manually.

Example:

import 'package:react/react_dom.dart' as react_dom;

react_dom.render(
    // Note the use of the `ReduxMultiProvider` as opposed to a traditional
    // `ReduxProvider`, and that the stores being passed in are the
    // `FluxToReduxAdapterStore`s.
    (ReduxMultiProvider()
      ..storesByContext = {
        randomColorStoreContext: randomColorStoreAdapter,
        lowLevelStoreContext: lowLevelStoreAdapter,
        anotherColorStoreContext: anotherColorStoreAdapter,
      }
    )(
      // Note that when being wrapped with `connect`, these components can
      // each reference a context included in `storesByContext`.
      ConnectFluxBigBlock()(),
      ReduxBigBlock()(),
      ShouldNotUpdate()(),
    ),
    querySelector('#content'));

Implementation

@Factory()
UiFactory<ReduxMultiProviderProps> ReduxMultiProvider =
    // ignore: undefined_identifier
    _$ReduxMultiProvider;