🗺️ Static route mapping for React Router

Overview

React Router Chart

Create a single source map of truth for all routes in your react app and easily render in react-router

NPM Version Build Status Coverage Status Dependabot badge Dependencies Gitpod Ready-to-Code

Getting Started

Install

Include in your dependencies.

npm install 'react-router-chart'

Recommended

Use React.lazy and React.Suspense to separate component logic from route mapping, by deferring the load of the component to the time of render.

See more

API Reference

The Route Object

This is what defines a mapping of ReactRouter objects. Should not be confused with react-router/Route.

Shapes

// https://reacttraining.com/react-router/web/api/Route
type ReactRouterRouteProps;

// https://reactjs.org/docs/components-and-props
type AnyObject;

// Used to initialise the Route object.
export interface RouteShape {
    name?: string;
    props?: ReactRouterRouteProps;
    renderProps?: AnyObject;
    suffixes?: Suffixes;
    nest?: {
        props?: ReactRouterRouteProps;
        renderProps?: AnyObject;
        routes?: RouteShape[];
    };
}

// Object with values as the path suffix and keys as path names.
export interface Suffixes {
    [name: string]: string;
}

Methods

These methods on the route. Most return a reference to the updated object for easier mapping.

setName(String): Route

Sets route.name and returns updated object for chaining. This is the value used for describing directions, therefore must be unique in the context of its parent route.

setProps(Object): Route

Sets route.props and returns updated object for chaining. See add props to apply a partial update.

addProps(Object): Route

Updates route.props and returns updated object for chaining. Accepts all react-router/Route props, using path as the base for suffixes when rendered.

rPath(String): Route

Sets route.props.path and returns updated object for chaining.

rkey(String): Route

Sets route.props.key and returns updated object for chaining.

This is passed to any rendered react-router/Route as the key prop.

rExact(Boolean): Route

Sets route.props.exact and returns updated object for chaining.

rStrict(Boolean): Route

Sets route.props.strict and returns updated object for chaining.

rLocation({ pathname }): Route

Sets route.props.location and returns updated object for chaining.

rSensitive(Boolean): Route

Sets route.props.sensitive and returns updated object for chaining.

rChildren(Function)

Sets route.props.children and returns updated object for chaining.

rComponent(ReactComponent): Route

Sets route.props.component and returns updated object for chaining.

rRender(Function): Route

Sets route.props.render and returns updated object for chaining.

setRenderProps(Object): Route

Sets route.renderProps. Extra properties passed to the render of this route. When this is non empty react router render property is always used.

setSuffixes(Suffixes): Route

Sets route.suffixes. Named paths appended to base, result used as value of react-router/Route path prop. Supports multiple suffixes each with unique keys.

addSuffixes(Suffixes): Route

Updates existing route.suffixes with one or more suffixes.

removeSuffixes(...String): Route

Updates existing route.suffixes, takes a list of names, used as keys to delete matching path suffixes. Returns updated object for chaining.

setNestedProps(Object): Route

Sets route.nest.props, optional base props passed to all children routes. This is equivalent to adding to the route.props of all nested Route.

setNestedRenderProps(Object): Route

Sets route.nest.renderProps, optional extra properties passed to the render of all children routes. This is equivalent to setting the route.renderProps of all nested Route.

setNestedRoutes(Route[]): Route

Sets route.nest.routes, the list of children routes. Will generates react-router/Route for every base and suffix combination.

addNestedRoutes(...Route): Route

Updates route.nest.routes, adding any number of routes to the existing list of nested routes.

removeNestedRoutes(...String): Route

Updates route.nest.routes, taking a number of route names and removeing from list of routes. This only works on named nested routes.

render(): ReactRouter.Route[]

Generate and return all the react-router/Route components.

describe(): RouteDirection

Generate easily accessible directions to all named paths.

export type RouteDirection = {
    [$: string]: string;
};

Usage

See example below.

The Chart Object

This is the library main export. See example below for more detailed usage.

Static Methods

Exposes two covenience methods, for initialising the rendering the route map.

route(RouteShape)

Create a Route object with the specified shape (see shape above). Equivalent to calling new Route(routeShape).

const route = Chart.route({
    name: "base",
    props: {
        path: "/",
        component: App,
        strict: true,
    },
});

route.name;         // "base"
route.props;        // { path: "/", strict: true }
route.describe().$; // "/"
render(Route):

Renders a given route object. Equivalent to calling route.render().

; ">
Chart.render(route);
// generates
<Route path="/" component={App} strict />;

Example

In route definition files

import { Chart } from "react-router-chart";

Start charting routes

const childRoute = Chart.route({
    props: { path: "/iam", component: ChildView, key: "a-child-view" },
    suffixes: { aChild: "/a/child" },
}).setRenderProps({ level: 2 });

const parentRoute = Chart.route({
    props: { exact: true, strict: true, component: BaseView },
    suffixes: { example: "/example/:id", demo: "/demo/:id" },
    renderProps: { highlight: true },
})
    .addNestedRoutes(childRoute)
    .setNestedProps({ exact: true, strict: true })
    .setNestedRenderProps({ highlight: true, level: 1 });

const baseRoute = Chart.route({
    name: "base",
    props: { path: "/mybase" },
    nest: { routes: [parentRoute] },
});

In main app with react router

<Switch>{ baseRoute.render() }</Switch>

Equivalent to

} /> } /> } /> } /> ">
<Switch>
    <Route
        path="/mybase/example/:id"
        key="/mybase/example/:id"
        exact
        strict
        render={ props => <BaseView highlight=true {...props} /> }
    />
    <Route
        path="/mybase/demo/:id"
        exact
        strict
        render={ props => <BaseView highlight=true {...props} /> }
    />
    <Route
        path="/mybase/example/:id/iam/a/child"
        key="a-child-view.0"
        exact
        strict
        render={ props => <ChildView highlight=true level=2 {...props} /> }
    />
    <Route
        path="/mybase/demo/:id/iam/a/child"
        key="a-child-view.1"
        exact
        strict
        render={ props => <ChildView highlight=true level=2 {...props} /> }
    />
</Switch>

Get directions to all named routes

const paths = route.describe();

Easily access location path

paths.$;                // "/mybase"
paths.demo.$;           // "/mybase/demo/:id"
paths.example.$;        // "/mybase/example/:id"
paths.demo.aChild.$;    // "/mybase/demo/:id/iam/a/child"
paths.example.aChild.$; // "/mybase/example/:id/iam/a/child"

Can be used in snapshots to verify generated routes.

Comments
  • chore: bump @typescript-eslint/eslint-plugin from 4.16.1 to 4.18.0

    chore: bump @typescript-eslint/eslint-plugin from 4.16.1 to 4.18.0

    Bumps @typescript-eslint/eslint-plugin from 4.16.1 to 4.18.0.

    Release notes

    Sourced from @​typescript-eslint/eslint-plugin's releases.

    v4.18.0

    4.18.0 (2021-03-15)

    Bug Fixes

    • eslint-plugin: [explicit-module-boundary-types] fixes #2864 related to functions in nested object properties (#3178) (55e1fba)
    • eslint-plugin: [no-extran-class] allowWithDecorator should ignore other errors (#3160) (a148673)

    Features

    • eslint-plugin: add package type declaration (#3164) (08b058a)

    v4.17.0

    4.17.0 (2021-03-08)

    Bug Fixes

    • eslint-plugin: [no-unnecessary-type-assertion] handle assignment (#3133) (cb22561)

    Features

    • eslint-plugin: [strict-bool-expr] add fixes and suggestions (#2847) (3f9e9a1)
    Changelog

    Sourced from @​typescript-eslint/eslint-plugin's changelog.

    4.18.0 (2021-03-15)

    Bug Fixes

    • eslint-plugin: [explicit-module-boundary-types] fixes #2864 related to functions in nested object properties (#3178) (55e1fba)
    • eslint-plugin: [no-extran-class] allowWithDecorator should ignore other errors (#3160) (a148673)

    Features

    • eslint-plugin: add package type declaration (#3164) (08b058a)

    4.17.0 (2021-03-08)

    Bug Fixes

    • eslint-plugin: [no-unnecessary-type-assertion] handle assignment (#3133) (cb22561)

    Features

    • eslint-plugin: [strict-bool-expr] add fixes and suggestions (#2847) (3f9e9a1)
    Commits
    • 3f4e9be chore: publish v4.18.0
    • 55e1fba fix(eslint-plugin): [explicit-module-boundary-types] fixes #2864 related to f...
    • 08b058a feat(eslint-plugin): add package type declaration (#3164)
    • a148673 fix(eslint-plugin): [no-extran-class] allowWithDecorator should ignore other ...
    • d3086d8 docs(eslint-plugin): [no-floating-promises] correct typo in 'allowAsStatement...
    • dd25790 chore: publish v4.17.0
    • cb22561 fix(eslint-plugin): [no-unnecessary-type-assertion] handle assignment (#3133)
    • 3f9e9a1 feat(eslint-plugin): [strict-bool-expr] add fixes and suggestions (#2847)
    • ae0271c docs(eslint-plugin): correct no longer valid references and examples (#3152)
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    Dependabot will merge this PR once CI passes on it, as requested by @iamogbz.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    dependencies 
    opened by dependabot[bot] 12
  • chore: bump @commitlint/travis-cli from 12.0.0 to 12.0.1

    chore: bump @commitlint/travis-cli from 12.0.0 to 12.0.1

    Bumps @commitlint/travis-cli from 12.0.0 to 12.0.1.

    Release notes

    Sourced from @​commitlint/travis-cli's releases.

    v12.0.1

    Bug Fixes

    • update dependency conventional-commits-parser to v3.2.1 (#2459) (8bcc4f0)
    • load: use Rule | AsyncRule | SyncRule as rule value type in Plugin (#2146) (75b67b8)
    • types: correct chalkColor type (#2420) (ef8bdad)
    • update dependency throat to v6 (#2417) (6f7db1b)
    Changelog

    Sourced from @​commitlint/travis-cli's changelog.

    12.0.1 (2021-02-23)

    Bug Fixes

    • update dependency conventional-commits-parser to v3.2.1 (#2459) (8bcc4f0)
    • load: use Rule | AsyncRule | SyncRule as rule value type in Plugin (#2146) (75b67b8)
    • types: correct chalkColor type (#2420) (ef8bdad)
    • update dependency throat to v6 (#2417) (6f7db1b)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    Dependabot will merge this PR once CI passes on it, as requested by @iamogbz.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    dependencies 
    opened by dependabot[bot] 11
  • chore: bump @babel/runtime from 7.12.5 to 7.12.13

    chore: bump @babel/runtime from 7.12.5 to 7.12.13

    Bumps @babel/runtime from 7.12.5 to 7.12.13.

    Release notes

    Sourced from @babel/runtime's releases.

    v7.12.13 (2021-02-03)

    Thanks @bradzacher, @bz2, @ChALkeR, @FauxFaux, @fedeci, @karansapolia, @panzarino, @shrinktofit, and @Zalathar for your first PRs!

    :eyeglasses: Spec Compliance

    • babel-parser
      • #12661 spec: disable await binding identifier within static block (@JLHwung)
    • babel-helper-create-class-features-plugin, babel-helpers, babel-plugin-proposal-private-methods, babel-runtime-corejs2, babel-runtime-corejs3, babel-runtime
      • #12689 fix: throw error when accessing private method without a getter (@fedeci)
    • babel-plugin-transform-computed-properties, babel-plugin-transform-shorthand-properties

    :bug: Bug Fix

    • babel-plugin-proposal-class-properties, babel-traverse
    • babel-plugin-proposal-class-properties, babel-plugin-transform-classes
    • babel-parser, babel-template
      • #12725 Permit %%placeholder%% in left-hand-side of a let declaration (@Zalathar)
    • babel-core, babel-helper-transform-fixture-test-runner, babel-register
    • babel-parser
      • #12686 (ts) Raise syntax error for an abstract method in non-abstract class (@sosukesuzuki)
      • #12684 fix(parser): throw error with wrong typescript 'export declare' (@fedeci)
      • #12520 Raise recoverable error for await expressions in sync functions (@sosukesuzuki)
      • #12678 fix: start TypePredicate node after returnToken (@JLHwung)
      • #12599 @babel/preset-typescript: fix tsx assigment issue (@Zzzen)
      • #12562 [ts]Add optional property to OptionalCallExpression node that has type arguments (@sosukesuzuki)
    • babel-helpers, babel-plugin-transform-classes
    • babel-generator
      • #12653 fix: avoid line breaks between class members head and key (@JLHwung)
    • babel-register
    • babel-node
    • babel-types
      • #12602 fix: cloneNode(deep, withoutLoc) handles absent comments (@FauxFaux)
      • #12575 Use isIdentifierChar instead of regex for toIdentifier (@mischnic)
    • babel-plugin-transform-modules-systemjs
    • babel-plugin-transform-for-of
    • babel-helper-create-class-features-plugin, babel-helper-replace-supers, babel-plugin-transform-classes
      • #12544 Correctly access shadowed class binding in super.* (@Zzzen)
    • babel-helper-module-imports, babel-plugin-transform-react-jsx-development, babel-plugin-transform-react-jsx

    :nail_care: Polish

    • babel-helper-transform-fixture-test-runner, babel-parser, babel-preset-env

    ... (truncated)

    Changelog

    Sourced from @babel/runtime's changelog.

    v7.12.13 (2021-02-03)

    :eyeglasses: Spec Compliance

    • babel-parser
      • #12661 spec: disable await binding identifier within static block (@JLHwung)
    • babel-helper-create-class-features-plugin, babel-helpers, babel-plugin-proposal-private-methods, babel-runtime-corejs2, babel-runtime-corejs3, babel-runtime
      • #12689 fix: throw error when accessing private method without a getter (@fedeci)
    • babel-plugin-transform-computed-properties, babel-plugin-transform-shorthand-properties

    :bug: Bug Fix

    • babel-plugin-proposal-class-properties, babel-traverse
    • babel-plugin-proposal-class-properties, babel-plugin-transform-classes
    • babel-parser, babel-template
      • #12725 Permit %%placeholder%% in left-hand-side of a let declaration (@Zalathar)
    • babel-core, babel-helper-transform-fixture-test-runner, babel-register
    • babel-parser
      • #12686 (ts) Raise syntax error for an abstract method in non-abstract class (@sosukesuzuki)
      • #12684 fix(parser): throw error with wrong typescript 'export declare' (@fedeci)
      • #12520 Raise recoverable error for await expressions in sync functions (@sosukesuzuki)
      • #12678 fix: start TypePredicate node after returnToken (@JLHwung)
      • #12599 @babel/preset-typescript: fix tsx assigment issue (@Zzzen)
      • #12562 [ts]Add optional property to OptionalCallExpression node that has type arguments (@sosukesuzuki)
    • babel-helpers, babel-plugin-transform-classes
    • babel-generator
      • #12653 fix: avoid line breaks between class members head and key (@JLHwung)
    • babel-register
    • babel-node
    • babel-types
      • #12602 fix: cloneNode(deep, withoutLoc) handles absent comments (@FauxFaux)
      • #12575 Use isIdentifierChar instead of regex for toIdentifier (@mischnic)
    • babel-plugin-transform-modules-systemjs
    • babel-plugin-transform-for-of
    • babel-helper-create-class-features-plugin, babel-helper-replace-supers, babel-plugin-transform-classes
      • #12544 Correctly access shadowed class binding in super.* (@Zzzen)
    • babel-helper-module-imports, babel-plugin-transform-react-jsx-development, babel-plugin-transform-react-jsx

    :nail_care: Polish

    • babel-helper-transform-fixture-test-runner, babel-parser, babel-preset-env
      • #12716 refactor: raise AwaitNotInAsyncContext when an AwaitExpression will be parsed (@JLHwung)
    • babel-cli, babel-core, babel-parser

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    Dependabot will merge this PR once CI passes on it, as requested by @iamogbz.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    dependencies 
    opened by dependabot[bot] 9
  • chore: bump eslint from 7.24.0 to 7.25.0

    chore: bump eslint from 7.24.0 to 7.25.0

    Bumps eslint from 7.24.0 to 7.25.0.

    Release notes

    Sourced from eslint's releases.

    v7.25.0

    • 5df5e4a Update: highlight last write reference for no-unused-vars (fixes #14324) (#14335) (Nitin Kumar)
    • 0023872 Docs: Add deprecated note to working-with-rules-deprecated page (#14344) (Michael Novotny)
    • 36fca70 Chore: Upgrade eslump to 3.0.0 (#14350) (Stephen Wade)
    • 59b689a Chore: add node v16 (#14355) (薛定谔的猫)
    • 35a1f5e Sponsors: Sync README with website (ESLint Jenkins)
    • fb0a92b Chore: rename misspelled identifier in test (#14346) (Tobias NieĂźen)
    • f2babb1 Docs: update pull request template (#14336) (Nitin Kumar)
    • 02dde29 Docs: Fix anchor in 'docs/developer-guide/working-with-rules.md' (#14332) (Nate-Wilkins)
    • 07d14c3 Chore: remove extraneous command from lint-staged config (#14314) (James George)
    • 41b3570 Update: lint code block with same extension but different content (#14227) (JounQin)
    • eb29996 Docs: add more examples with arrow functions for no-sequences rule (#14313) (Nitin Kumar)
    Changelog

    Sourced from eslint's changelog.

    v7.25.0 - April 23, 2021

    • 5df5e4a Update: highlight last write reference for no-unused-vars (fixes #14324) (#14335) (Nitin Kumar)
    • 0023872 Docs: Add deprecated note to working-with-rules-deprecated page (#14344) (Michael Novotny)
    • 36fca70 Chore: Upgrade eslump to 3.0.0 (#14350) (Stephen Wade)
    • 59b689a Chore: add node v16 (#14355) (薛定谔的猫)
    • 35a1f5e Sponsors: Sync README with website (ESLint Jenkins)
    • fb0a92b Chore: rename misspelled identifier in test (#14346) (Tobias NieĂźen)
    • f2babb1 Docs: update pull request template (#14336) (Nitin Kumar)
    • 02dde29 Docs: Fix anchor in 'docs/developer-guide/working-with-rules.md' (#14332) (Nate-Wilkins)
    • 07d14c3 Chore: remove extraneous command from lint-staged config (#14314) (James George)
    • 41b3570 Update: lint code block with same extension but different content (#14227) (JounQin)
    • eb29996 Docs: add more examples with arrow functions for no-sequences rule (#14313) (Nitin Kumar)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    Dependabot will merge this PR once it's up-to-date and CI passes on it, as requested by @iamogbz.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    dependencies 
    opened by dependabot[bot] 8
  • chore: bump webpack from 5.23.0 to 5.24.0

    chore: bump webpack from 5.23.0 to 5.24.0

    Bumps webpack from 5.23.0 to 5.24.0.

    Release notes

    Sourced from webpack's releases.

    v5.24.0

    Bugfixes

    • fix name conflict when using destructing with default arguments in concatenated modules
    • fix tracking of reexports in concatenated modules when using multiple export * that point to the same export
    • debug logging is now included even if logging is not
    • fix name of ModuleConcatenationPlugin logger
    • fix experiments.lazyCompilation: true. It now has an effect.

    Developer Experience

    • expose Watching type

    Contribution

    • fix husky setup

    Performance

    • improve performance of module concatenation
    Commits
    • 63c14cc 5.24.0
    • 4e0e03b Merge pull request #12752 from webpack/bugfix/lazy-compilation
    • 0742a05 fix experiments.lazyCompilation: true
    • 4ed5ccd Merge pull request #12751 from webpack/bugfix/concat-reexports
    • 87a70e0 unset targets when a harmony star reexport is hidden by another one
    • 972b7f9 Merge pull request #12743 from webpack/bugfix/logger-name
    • 84c96f8 Merge pull request #12739 from chenxsan/bugfix/fix-husky-upgrade
    • 305db4c Merge pull request #12746 from webpack/bugfix/logging-debug
    • a90d2b2 fix logger name
    • 2bfbf81 Merge pull request #12745 from webpack/perf/module-concatenation
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    Dependabot will merge this PR once CI passes on it, as requested by @iamogbz.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    dependencies 
    opened by dependabot[bot] 8
  • chore: bump webpack from 5.22.0 to 5.23.0

    chore: bump webpack from 5.22.0 to 5.23.0

    Bumps webpack from 5.22.0 to 5.23.0.

    Release notes

    Sourced from webpack's releases.

    v5.23.0

    Features

    • add parserOptions.url: "relative" option
      • Allows to generate relative URLs from new URL (e. g. for SSG/SSR)

    Bugfixes

    • fixes for electron target
      • electron has importScripts in worker
      • only choose a chunkLoading which fits to the chunkFormat
      • prefer fetch wasm loading over node wasm loading
    • fix regression when combining library + runtimeChunk + node target

    Developer Experience

    • export MultiStats type
    Commits
    • 7774d7e 5.23.0
    • cdac669 Merge pull request #12710 from webpack/bugfix/library-runtime-chunk
    • cc6f3d9 fix regression when combining library + runtimeChunk + node target
    • 61dbb57 Merge pull request #12590 from chenxsan/feature/export-MultiStats-type
    • 5849090 Merge pull request #12696 from webpack/dependabot/npm_and_yarn/eslint-plugin-...
    • 32bd1a2 Merge pull request #12692 from dnalborczyk/spellcheck
    • 327fa43 chore(deps-dev): bump eslint-plugin-jsdoc from 31.6.1 to 32.0.2
    • 05768d9 Merge pull request #12695 from webpack/feature/relative-url
    • 5d57777 add parser.url: "relative" option
    • bd5e4dd chore: move word to cspell.json
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    Dependabot will merge this PR once CI passes on it, as requested by @iamogbz.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    dependencies 
    opened by dependabot[bot] 8
  • chore: bump semantic-release from 17.3.2 to 17.3.3

    chore: bump semantic-release from 17.3.2 to 17.3.3

    Bumps semantic-release from 17.3.2 to 17.3.3.

    Release notes

    Sourced from semantic-release's releases.

    v17.3.3

    17.3.3 (2021-01-15)

    Bug Fixes

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    Dependabot will merge this PR once CI passes on it, as requested by @iamogbz.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    dependencies 
    opened by dependabot[bot] 8
  • chore: bump @babel/core from 7.15.8 to 7.16.0

    chore: bump @babel/core from 7.15.8 to 7.16.0

    Bumps @babel/core from 7.15.8 to 7.16.0.

    Release notes

    Sourced from @​babel/core's releases.

    v7.16.0 (2021-10-30)

    :eyeglasses: Spec Compliance

    • babel-helpers, babel-plugin-proposal-async-generator-functions, babel-runtime-corejs2, babel-runtime-corejs3, babel-runtime

    :rocket: New Feature

    • babel-generator, babel-parser, babel-plugin-transform-typescript, babel-types
    • babel-parser
    • babel-helper-fixtures, babel-helper-transform-fixture-test-runner, babel-parser, babel-plugin-syntax-typescript, babel-preset-typescript
    • Other
    • babel-generator, babel-parser, babel-plugin-proposal-pipeline-operator, babel-plugin-syntax-pipeline-operator
    • babel-compat-data, babel-generator, babel-parser, babel-preset-env, babel-types
    • babel-helper-skip-transparent-expression-wrappers, babel-plugin-proposal-optional-chaining
    • babel-traverse, babel-types

    :bug: Bug Fix

    • babel-parser, babel-plugin-transform-typescript
    • babel-plugin-transform-typescript
    • babel-core, babel-helper-create-class-features-plugin, babel-plugin-transform-typescript
    • babel-compat-data, babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression, babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining, babel-plugin-transform-react-constant-elements, babel-preset-env, babel-traverse
      • #13842 Implement @​babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression (@​JLHwung)
    • babel-plugin-proposal-async-generator-functions, babel-traverse
    • babel-traverse, babel-types
    • babel-generator

    :house: Internal

    ... (truncated)

    Changelog

    Sourced from @​babel/core's changelog.

    v7.16.0 (2021-10-30)

    :eyeglasses: Spec Compliance

    • babel-helpers, babel-plugin-proposal-async-generator-functions, babel-runtime-corejs2, babel-runtime-corejs3, babel-runtime

    :rocket: New Feature

    • babel-generator, babel-parser, babel-plugin-transform-typescript, babel-types
    • babel-parser
    • babel-helper-fixtures, babel-helper-transform-fixture-test-runner, babel-parser, babel-plugin-syntax-typescript, babel-preset-typescript
    • Other
    • babel-generator, babel-parser, babel-plugin-proposal-pipeline-operator, babel-plugin-syntax-pipeline-operator
    • babel-compat-data, babel-generator, babel-parser, babel-preset-env, babel-types
    • babel-helper-skip-transparent-expression-wrappers, babel-plugin-proposal-optional-chaining
    • babel-traverse, babel-types

    :bug: Bug Fix

    • babel-parser, babel-plugin-transform-typescript
    • babel-plugin-transform-typescript
    • babel-core, babel-helper-create-class-features-plugin, babel-plugin-transform-typescript
    • babel-compat-data, babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression, babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining, babel-plugin-transform-react-constant-elements, babel-preset-env, babel-traverse
      • #13842 Implement @​babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression (@​JLHwung)
    • babel-plugin-proposal-async-generator-functions, babel-traverse
    • babel-traverse, babel-types
    • babel-generator

    :house: Internal

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    Dependabot will merge this PR once it's up-to-date and CI passes on it, as requested by @iamogbz.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 7
  • chore: bump @types/node from 16.9.2 to 16.9.6

    chore: bump @types/node from 16.9.2 to 16.9.6

    Bumps @types/node from 16.9.2 to 16.9.6.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    Dependabot will merge this PR once CI passes on it, as requested by @iamogbz.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 7
  • chore: bump eslint-plugin-react from 7.25.2 to 7.26.0

    chore: bump eslint-plugin-react from 7.25.2 to 7.26.0

    Bumps eslint-plugin-react from 7.25.2 to 7.26.0.

    Changelog

    Sourced from eslint-plugin-react's changelog.

    7.26.0 - 2021.09.20

    Added

    Fixed

    Changed

    • [no-access-state-in-setstate]: passing test for “don't error if it's not a React Component” (#1873 @​kentcdodds)

    #3078: yannickcr/eslint-plugin-react#3078 #2640: yannickcr/eslint-plugin-react#2640 #2759: yannickcr/eslint-plugin-react#2759 #1873: yannickcr/eslint-plugin-react#1873

    7.25.3 - 2021.09.19

    Fixed

    Changed

    #3076: yannickcr/eslint-plugin-react#3076 #3071: yannickcr/eslint-plugin-react#3071

    Commits
    • 8cf47a8 Update CHANGELOG and bump version
    • e4acd07 [Dev Deps] update @types/estree, @types/node, eslint-plugin-eslint-plugin
    • 83eb226 [New] jsx-max-props-per-line: add single and multi options
    • 95a8a4e [Dev Deps] update eslint-remote-tester
    • df939e3 [Tests] no-access-state-in-setstate: passing test for “don't error if it's ...
    • f4d4314 [Refactor] no-unstable-nested-components: use isCreateElement util (f25a8...
    • ddff237 [Refactor] no-danger: use Object.fromEntries and Object.hasOwn instead of r...
    • d51bc61 [Fix] restore eslint < 4.15 compatibility
    • 9799131 [Fix] display-name: Get rid of false position on component detection
    • 53a0d84 [New] add no-namespace rule
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    Dependabot will merge this PR once CI passes on it, as requested by @iamogbz.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 7
  • chore: bump @commitlint/travis-cli from 12.1.4 to 13.1.0

    chore: bump @commitlint/travis-cli from 12.1.4 to 13.1.0

    Bumps @commitlint/travis-cli from 12.1.4 to 13.1.0.

    Release notes

    Sourced from @​commitlint/travis-cli's releases.

    v13.1.0

    13.1.0 (2021-07-24)

    Bug Fixes

    • cz-commitlint: fix minor formatting issues (99d8881)
    • types: adds TargetCaseType[] for CaseRuleConfig (c3bef38)
    • update dependency import-from to v4 (#2629) (5bcb604)
    • cli: remove hard coded comment char with linting COMMIT_EDIT_MSG (#2618) (5badf6d), closes #2351

    Features

    • rules: allow body-case to accept an array of cases (5383c9e), closes #2631

    v13.0.0

    13.0.0 (2021-05-24)

    Bug Fixes

    Features

    BREAKING CHANGES

    • minimum node version is 12
    Changelog

    Sourced from @​commitlint/travis-cli's changelog.

    13.1.0 (2021-07-24)

    Bug Fixes

    • cz-commitlint: fix minor formatting issues (99d8881)
    • types: adds TargetCaseType[] for CaseRuleConfig (c3bef38)
    • update dependency import-from to v4 (#2629) (5bcb604)
    • cli: remove hard coded comment char with linting COMMIT_EDIT_MSG (#2618) (5badf6d), closes #2351

    Features

    • rules: allow body-case to accept an array of cases (5383c9e), closes #2631

    13.0.0 (2021-05-24)

    Bug Fixes

    Features

    BREAKING CHANGES

    • minimum node version is 12

    12.1.3 (2021-05-12)

    Bug Fixes

    ... (truncated)

    Commits
    • dfbb8c5 v13.1.0
    • 5f13a06 chore: update dependency @​types/semver to v7.3.8 (#2689)
    • 8187c1c chore: update dependency lint-staged to v11.1.0 (#2686)
    • ef4ffdf chore: update dependency ts-jest to v27.0.4 (#2682)
    • c7a4e95 chore: update dependency eslint-plugin-jest to v24.4.0 (#2683)
    • 99d8881 fix(cz-commitlint): fix minor formatting issues
    • 15d3b9d chore: update dependency eslint-plugin-jest to v24.3.7 (#2681)
    • 5d776d1 chore: update babel monorepo to v7.14.8 (#2680)
    • 026c4f8 chore: update typescript-eslint monorepo to v4.28.4 (#2679)
    • c49a03e chore: update dependency eslint to v7.31.0 (#2678)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    Dependabot will merge this PR once it's up-to-date and CI passes on it, as requested by @iamogbz.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 7
  • Publish type definitions

    Publish type definitions

    Is your feature request related to a problem? Please describe. Have type definitions for when the package is imported

    Describe the solution you'd like All types in published package.json in main.d.ts file

    Describe alternatives you've considered Publish as @types/react-router-chart

    Additional context https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html

    enhancement good first issue 
    opened by iamogbz 0
Releases(v0.2.5)
Owner
Emmanuel Ogbizi
Ardently anticipating an advent around artificial acuity 🤖
Emmanuel Ogbizi
tiny, flexible, HOC for rendering route breadcrumbs with react-router v4 & 5

React Router Breadcrumbs HOC A small (~1.3kb compressed & gzipped), flexible, higher order component for rendering breadcrumbs with react-router 5 exa

Justin Schrader 303 Oct 12, 2022
Route Sphere - Sync query parameters with a MobX store and React Router

Route Sphere - Sync query parameters with a MobX store and React Router

VocaDB Devgroup 1 May 21, 2022
Build React Nxt Trendz App With Protected Route

In this project, let's build Nxt Trendz app with Protected Route by applying the concepts we have learned till now. Refer to the image below: Design F

null 5 Sep 6, 2022
:tada: Redux First History - Redux history binding support react-router - @reach/router - wouter

redux-first-history Redux First History - Make Redux 100% SINGLE-AND-ONLY source of truth! Redux history binding for react-router @reach/router wouter

Salvatore RavidĂ  367 Dec 31, 2022
Redux bindings for React Router – keep your router state inside your Redux store

redux-router This project is experimental. For bindings for React Router 1.x see here In most cases, you don’t need any library to bridge Redux and Re

Andrew Clark 2.3k Dec 7, 2022
Render isomorphic React + React Router apps and components in Node

Render isomorphic React + React Router apps and components in Node

Sequence Media 3 Nov 1, 2022
named routes for react-router and your react application

react-router-namesake Example import { Switch } from "react-router"; import { BrowserRouter, Route, Link } from "react-router-dom"; import { Router as

Joe Hsu 6 Aug 12, 2021
Frontend of agro rent app built with React, Axios, React-router-dom v6 & Bootstrap

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: ya

Anuj Sharma 1 Dec 8, 2021
React app with TypeScript - React Router Dom

React Project with - React Router Dom My name is Alex Principe. I'm a Full stack developer who shares programming code with the community. This repo c

Alex Principe 2 Sep 20, 2022
You can found the concept of react hooks, local storage, conditional rendering and react-router-dom.

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

Tikaram Acharya 2 Jun 1, 2022
a more intuitive way of defining private, public and common routes for react applications using react-router-dom v6

auth-react-router is a wrapper over react-router-dom v6 that provides a simple API for configuring public, private and common routes (React suspense r

Pasecinic Nichita 12 Dec 3, 2022
Automatic breadcrumbs for React-Router

React Breadcrumbs React component use to generate a breadcrumb trail (compatible with React Router). Installation npm install --save react-breadcrumbs

Sven Anders Robbestad 409 Dec 9, 2022
Declarative router component for React.

React Router Component Version Compatibility >= 0.39.0 React v15,16 >= 0.32.0 React v15 >= 0.27.0 React 0.14 0.24 - 0.26.0 React 0.13 0.23 - 0.26.0 Re

Samuel Reed 871 Nov 29, 2022
React Router scroll management

react-router-scroll React Router scroll management. react-router-scroll is a React Router middleware that adds scroll management using scroll-behavior

Jimmy Jia 846 Dec 18, 2022
🔼 UI-Router for React

UI-Router provides extremely flexible, state based routing to the React ecosystem.

UI-Router 444 Dec 22, 2022
Easy Router for Effector with React bindings

effector-easy-router A declarative router for effector and react. It is inspired by react-router-dom and effector gates. Routes are independent from e

Kirill Kubryakov 10 Oct 7, 2022
React router that supports rendering of multiple independent (auxiliary) routes.

aux-router React router that supports rendering of multiple independent (auxiliary) routes. Install npm install --save aux-router Documentation AuxRou

Kamil Bugno 20 Oct 4, 2021
A small router library for React focusing on the Developer Experience

Crossroad A routing library for React with a familiar interface. It has some differences with React Router so you write cleaner code: The links are pl

Francisco Presencia 17 Dec 10, 2022
A simple and safe router for React and TypeScript.

A simple and safe router for React and TypeScript.

Mathieu Acthernoene 247 Dec 31, 2022