Coder Social home page Coder Social logo

le-nn / memento Goto Github PK

View Code? Open in Web Editor NEW
32.0 32.0 2.0 28.79 MB

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

C# 100.00%
blazor flux redux-devtools state-management store

memento's People

Contributors

le-nn avatar rdghm1234 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

memento's Issues

.NET 8 : to be compatible with '@rendermode InteractiveAuto/InteractiveWebAssembly/InteractiveServer'

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.

image

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.

Store API improvements

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.

Improvements Typescript message handling

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(),
})

Change performance test

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.