Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5983528
0002-contain-and-manage-state.md
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
0002-contain-and-manage-state.md
View Options
#
2
.
Contain
and
manage
state
Date
:
2016
-
11
-
09
##
Status
Accepted
##
Context
The
hardest
part
of
debugging
Page
Previews
issues
(
especially
those
related
to
EventLogging
)
was
understanding
the
state
of
the
system
(
the
"state"
)
and
how
it
'
s
mutated
given
some
interaction
(
s
).
This
was
in
no
small
part
because
the
state
was
defined
,
initialized
,
and
mutated
in
various
parts
of
the
codebase
.
The
state
required
for
Page
Previews
to
function
isn
'
t
actually
overly
complicated
.
To
keep
things
easy
to
debug
/
easy
to
reason
about
we
should
endeavour
to
isolate
the
state
and
its
mutations
from
the
various
other
parts
of
the
system
.
##
Decision
Use
[
Redux
](
http
:
//redux.js.org).
##
Consequences
*
Newcomers
will
have
to
familiarise
themselves
with
the
library
(
especially
it
'
s
nomenclature
).
*
All
changes
will
have
to
be
broken
down
into
:
the
additional
state
that
they
require
;
actions
that
are
dispatched
;
and
how
the
state
is
mutated
as
a
result
of
those
actions
.
This
requires
discipline
.
*
We
benefit
from
using
a
tool
that
is
part
of
an
increasingly
rich
ecosystem
,
e
.
g
.
see
[
Redux
DevTools
Extension
](
https
:
//github.com/zalmoxisus/redux-devtools-extension).
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 3, 22:54 (1 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
17/82/6ddb6d5e4ee2d68f69197f3d3c38
Default Alt Text
0002-contain-and-manage-state.md (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment