Commit Graph

10 Commits

Author SHA1 Message Date
Kevin Ghadyani
62957d2472
Added ability to display function name as actionType
The normal advice is that `actionType` should be a string. This is purely for debugging purposes. If the tools used for debugging are altered, then it would be easier to use something other than a string.

Using a function means you don't have to have a separate action variable from the action creator itself:
```js
some someActionCreator = () => ({
  type: someActionCreator,
})
```

Redux doesn't care if your action type is a string, object, symbol or whatever. Even @gaearon noted it should be a Symbol for uniqueness, but only said to use strings because of the debugging potential.

Another benefit of using functions is you're only comparing memory references rather than strings. This is a performance boost, but probably not one that will manifest in most applications.

We could even take this further to include `symbol.description` and `classInstance.constructor.name`.

The one downfall is most Redux tooling both utilizes and expects strings. This would need to change. Even `createReducer` would need to take a `Map` of actions instead of an `Object` or this wouldn't work.
2019-10-30 14:28:45 -05:00
nndio
818d685ec7 Update babel 2019-02-06 01:59:55 +02:00
nndio
6907c48147 Use prettier 2019-01-10 20:51:14 +02:00
nndio
458f9019aa Fix and unify eslint 2019-01-10 19:23:33 +02:00
nndio
da72f6778a Update webpack for all packages 2019-01-09 02:06:21 +02:00
Zalmoxisus
2d69d523ed Prepare since master misses some necessary builds 2019-01-05 02:49:32 +02:00
Zalmoxisus
edd397d7db Add lint for pre-commit 2019-01-03 17:40:38 +02:00
Paul Rosset
96281e9dc2 Fix readme link to original package (#439) 2018-12-23 23:49:23 +02:00
Mihail Diordiev
e6fdfb9c9e
Merge redux-devtools-log-monitor (#432)
* Move from gaearon/redux-devtools-log-monitor

* Npm package config and add credits
2018-12-22 02:50:57 +02:00
Mihail Diordiev
89880265a6
Move redux-devtools-inspector package (#429)
* Move from zalmoxisus/remotedev-inspector-monitor fork

* Fix linting

* Add credits

* Upgrade to react 16

Moved from zalmoxisus/remotedev-inspector-monitor/pull/5

* Upgrade dependences

* Add demo for ES6 map

From
alexkuz/redux-devtools-inspector/commit/9dfaaabcfba7913fd15ee6ee43627e0c
eb1d5c7b
2018-12-22 02:10:49 +02:00