Documentation and cleanup

This commit is contained in:
kibigo!
2017-07-14 11:13:02 -07:00
parent 21b04af524
commit d0aad1ac85
11 changed files with 705 additions and 189 deletions

View File

@@ -18,12 +18,12 @@ associated actions are:
*/
/* * * * */
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
/*
Imports
-------
Imports:
--------
*/
@@ -36,12 +36,12 @@ import { STORE_HYDRATE } from '../../mastodon/actions/store';
// Our imports //
import { LOCAL_SETTING_CHANGE } from '../actions/local_settings';
/* * * * */
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
/*
initialState
------------
initialState:
-------------
You can see the default values for all of our local settings here.
These are only used if no previously-saved values exist.
@@ -71,12 +71,12 @@ const initialState = ImmutableMap({
}),
});
/* * * * */
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
/*
Helper functions
----------------
Helper functions:
-----------------
### `hydrate(state, localSettings)`
@@ -89,12 +89,12 @@ from `localStorage`.
const hydrate = (state, localSettings) => state.mergeDeep(localSettings);
/* * * * */
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
/*
`localSettings(state = initialState, action)`
---------------------------------------------
`localSettings(state = initialState, action)`:
----------------------------------------------
This function holds our actual reducer.