le-nn / memento Goto Github PK
View Code? Open in Web Editor NEWA simple client-side state management container for Blazor/.NET includes redo/undo and ReduxDevTools support.
Home Page: https://github.com/le-nn/memento
License: MIT License
A simple client-side state management container for Blazor/.NET includes redo/undo and ReduxDevTools support.
Home Page: https://github.com/le-nn/memento
License: MIT License
While referring to sample projects, source folders, and documentation, I tried applying Memento ReduxDevToolMiddleware (Browser/Remote) to a template project set to 'Interactive render mode:Auto', but it cannot be connected with Redux DevTools.
I would be happy if I could see the status changes for SSR mode and WASM mode separately on DevTools, but is this possible to applying Memento ReduxDevToolMiddleware?
Thank you.
memento/src/Memento.Core/AbstractStore.cs
Line 302 in b6ed9d0
internal void InvokeObserver(StateChangedEventArgs<TState> e) {
foreach (var obs in _observers.ToArray()) {
obs.OnNext(e);
}
}
Change the EventArgs to have a typed Payload when changing the State of the Store.
When mutating, raise an event with a Payload explaining what the change has been.
class UnhandledMessageExceptions {
public UnhandledMessageExceptions (): base("Message has not handled. "){}
}
Only AddSingleton is currently supported, but allow the mode to be selected.
export type MessageConstructor<T> = {
new(args: T): Message<T>,
name: string;
}
type MessageOf<T> = Message & { comparer: T[keyof T] };
const message = <T = void>(): MessageConstructor<T> => {
return class <T> extends Message<T>{
};
}
// example
const messages = ({
Test: message<number>(),
Test2: message(),
})
Since the process of adding to History is heavy and I do not know exactly, change to CountUp only
Change from
public void CountUp() {
Mutate(state => state with {
Count = state.Count + 1,
History = state.History.Add(state.Count + 1),
});
}
Change to
public void CountUpWithoutHistory() {
Mutate(state => state with {
Count = state.Count + 1,
});
}
for (var i = 0; i < 100000; i++) {
store.CountUpWithoutHistory();
}
sw.Stop();
Assert.Equal(100000, commands.Count);
Assert.True(sw.ElapsedMilliseconds < 100);
Repeat 100000 times, 100 ms or less
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.