News for hackers. Stuff that matters.
Re:Build Yourself a Redux by ezpg on Friday May 05, 2017 @07:01PM (#14277450)
Use Symbols instead of Strings: https://www.keithcirkel.co.uk/metaprogramming-in-es6-symbols...

See the second line of the code snippet under "Symbols are completely unique…"

Unless I have misunderstood the spec, to compare symbols you require both the reference and value. Much more preferable than passing around Strings.

Re:Build Yourself a Redux by acemarke on Friday May 05, 2017 @07:44PM (#14277669)
You _can_ use Symbols for `action.type` in Redux, but that's discouraged, because they're not serializable and thus will not work properly with time-travel debugging. See http://redux.js.org/docs/faq/Actions.html#actions-string-con... .