From 6954bc50843f663a153869fb6c8e7dc28b69b546 Mon Sep 17 00:00:00 2001 From: timwis Date: Sat, 2 Jul 2016 21:05:52 -0400 Subject: [PATCH] Rename action param -> data in index.js --- index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 7826ff5..872e066 100644 --- a/index.js +++ b/index.js @@ -79,8 +79,8 @@ function choo (opts) { // update the DOM after every state mutation // (obj, obj, obj, str, fn) -> null - function render (action, state, prev, name, createSend) { - if (opts.onState) opts.onState(action, state, prev, name, createSend) + function render (data, state, prev, name, createSend) { + if (opts.onState) opts.onState(data, state, prev, name, createSend) if (state === prev) return const newTree = _router(state.location.pathname, state, prev) @@ -133,8 +133,8 @@ function appInit (opts) { const loc = document.location const state = { pathname: (opts.hash) ? hashMatch(loc.hash) : loc.href } const reducers = { - setLocation: function setLocation (action, state) { - return { pathname: action.location.replace(/#.*/, '') } + setLocation: function setLocation (data, state) { + return { pathname: data.location.replace(/#.*/, '') } } } // if hash routing explicitly enabled, subscribe to it