8.0.0 • Published 6 months ago

@talend/react-cmf-router v8.0.0

Weekly downloads
772
License
Apache-2.0
Repository
-
Last release
6 months ago

@talend/react-cmf-router

This is the old router of react-cmf packaged as external dependency.

Setup

First add it to your bootstrap app

import cmf from '@talend/react-cmf';
import getRouter from '@talend/react-cmf-router';

const routerFunctions = {
    // key for OnEnter/onLeave in router config: value is the function
};

const router = getRouter({ history, sagaRouterConfig, routerFunctions });

cmf.bootstrap({
    modules: [router.cmfModule],
    RootComponent: router.RootComponent,
});

If your project has multiple modules with routerConfig you can pass all of them to getRouter() the following way:

const router = getRouter(config1, config2, config3);

The getRouter function will merge all of them to build the router configuration.

So be careful with the order since the next has a higher priority comparing to the previous config.

routerAPI

routerAPI is an object which expose the following api:

namereturn typedescription
routerAPI.selectors.getLocation(state)objectcurrent location object
routerAPI.selectors.getPath(state)stringthe current path (a string) which is the fragment so you can apply matchPath to it
8.0.0

6 months ago

7.1.1

6 months ago

7.1.0

6 months ago

6.1.3

1 year ago

6.2.0

1 year ago

7.0.0

1 year ago

7.0.1

12 months ago

6.1.2

1 year ago

6.1.1

2 years ago

6.1.0

2 years ago

6.0.0

2 years ago

5.3.0

2 years ago

5.2.6

2 years ago

5.2.5

3 years ago

5.2.4

3 years ago

5.2.3

3 years ago

5.2.2

3 years ago

5.2.1

3 years ago

5.2.0

3 years ago

5.0.0-0

3 years ago

5.0.0-1

3 years ago

5.0.0-2

3 years ago

5.0.0-3

3 years ago

5.1.1

3 years ago

5.1.0

3 years ago

5.0.0

3 years ago

5.0.0-4

3 years ago

3.5.8

3 years ago

4.0.1

3 years ago

4.0.0

3 years ago

3.5.7

4 years ago

3.5.6

4 years ago

3.5.5

4 years ago

3.5.4

4 years ago

3.5.3

4 years ago

3.5.2

4 years ago

4.0.0-alpha.1

4 years ago

3.5.1

5 years ago

3.5.1-alpha.1

5 years ago

3.5.0

5 years ago

3.5.0-alpha.0

5 years ago

3.4.0

5 years ago

3.4.0-alpha-6

5 years ago

3.4.0-alpha-5

5 years ago

3.4.0-alpha-4

5 years ago

3.4.0-alpha-3

5 years ago

3.4.0-alpha-2

5 years ago

3.4.0-alpha-1

5 years ago

3.3.1

5 years ago

3.3.0

5 years ago

3.2.1

6 years ago

3.2.0

6 years ago

3.1.1

6 years ago

3.1.0

6 years ago

3.0.1-0

6 years ago

3.0.0

6 years ago

3.0.0-2

7 years ago

3.0.0-1

7 years ago

3.0.0-0

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago