Skip to content

Commit

Permalink
Fix export
Browse files Browse the repository at this point in the history
  • Loading branch information
captbaritone committed Oct 1, 2018
1 parent cdfa993 commit 462cf4b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/actionCreators/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export {
windowsHaveBeenCentered,
centerWindowsIfNeeded,
resetWindowLayout,
browserWindowSizeChanged
browserWindowSizeChanged,
ensureWindowsAreOnScreen
} from "./windows";
export {
play,
Expand Down
19 changes: 19 additions & 0 deletions redux.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Thoughts on Redux

## Actions describe a thing that happened

Actions with names like `"SET_USER_NAME"` are a smell. Instead, prefer names like `"USERNAME_INPUT_CHANGED"`. Your actions should be a log of _facts_ and should not have any opinions about how those facts are interperated.

## Actions and action creators are a global concern

Reduces should know about actions, but actions should not know about your reducers.

## Your state is a cache

In principle, your state could simply be an array of every action that has been dispatched, and you could derive the current value by running your reducer in your selector.

### What would this redux look like? How could you optimize it?

- Often you need to refer to some other portion of your state within your reducer. How would you do this?

##

0 comments on commit 462cf4b

Please sign in to comment.