You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the patterns that has emerged with using microstates a lot is the concept of a "higher order" microstate: A function that takes a parameter and returns a microstate type. parameterized() was a very rudimentary implementation of this, but is no longer necessary since it's now obvious in retrospect that we could have used simple functions instead.
The only parameterized types in the system are ObjectType and ArrayType, which should be replaced by functions: ObjectOf() and ArrayOf():
before
letarray=create(ArrayType.of(String),['hi']);
after
letarray=create(ArrayOf(String),['hi']);
In actual fact however, this will be little noticed since most of the time we use the DSL anyhow.
but mostly still just
letarray=create([String],['hi']);
checklist:
replace ObjectType with ObjectOf() function
replace ArrayType with ArrayOf() function
make new functions stable such that ArrayOf(Type) === ArrayOf(Type)
remove parameterized.js
The text was updated successfully, but these errors were encountered:
One of the patterns that has emerged with using microstates a lot is the concept of a "higher order" microstate: A function that takes a parameter and returns a microstate type.
parameterized()
was a very rudimentary implementation of this, but is no longer necessary since it's now obvious in retrospect that we could have used simple functions instead.The only parameterized types in the system are
ObjectType
andArrayType
, which should be replaced by functions:ObjectOf()
andArrayOf()
:before
after
In actual fact however, this will be little noticed since most of the time we use the DSL anyhow.
but mostly still just
checklist:
ObjectType
withObjectOf()
functionArrayType
withArrayOf()
functionArrayOf(Type) === ArrayOf(Type)
parameterized.js
The text was updated successfully, but these errors were encountered: