Skip to content
This repository was archived by the owner on Oct 26, 2018. It is now read-only.
This repository was archived by the owner on Oct 26, 2018. It is now read-only.

Support for additional action arguments #187

@udnisap

Description

@udnisap

I was using this for a while and thought this might be a quick implementation of router params.
This is just passing the params to the reducer not via URL but via action itself.

at https://github.com/rackt/redux-simple-router/blob/master/src/index.js#L8

if we replace

function transition(method) {
  return arg => ({
    type: TRANSITION,
    method, arg
  })
}

with

function transition(method) {
  return (arg, data) => ({
    type: TRANSITION,
    method, arg, data
  })
}

we can do something link

import { routeActions } from 'redux-simple-router'
routeActions.push('login', 'custom data');

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