Skip to content

Plugins can only be set via props, not by manually setting them on router instance. #15

@lenehan2

Description

@lenehan2

Currently, ConntectUIRouter requires plugins to be passed as a prop. This limits the ability to apply plugins exclusively by setting them on the router instance.

For example

const router = new UIRouterReact();
router.plugin(pushStateLocationPlugin);
const store = createRoutedStore(router);

const App = () => (
  <Provider store={store}>
    <ConnectedUIRouter
      router={router}
      states={states}
    >

instead of passing the pushStateLocationPlugin in via plugins prop here.

Pr #14 defaults the plugins prop to an empty array which allows users to set these manually when creating the router instance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions