Where in the previous blog posts I alwasy showed how to store a history by swapping one state with another. This also means you have to keep a history of the state, which in most cases is not wanted. Not for performance and memory reasons, but neither for programming reasons. Having actions that simply swap one state with another means that the callee has to completely calculate the new state and wrap that in an action. It makes far more sense to have different types of actions that actually perform operations on the state that results in a new state. This is exactly what I am doing in this blog post, I am introducing json patch to the framework, a nice benefit of this is that it will then also be possible to take the history as a json patch and send that to the back-end with a REST PATCH operation.

Continue reading "Javascript Patch Actions"


This free site is ad-supported. Learn more
chrisvesters | August 1, 2021 at 9:00 am | Tags: Design, Framework, Javascript, TypeScript | Categories: Development | URL: https://wp.me/p6oy6N-1gs
Comment        Like