Coder Social home page Coder Social logo

redux-beacon-vuex? about redux-beacon HOT 5 CLOSED

rangle avatar rangle commented on May 24, 2024
redux-beacon-vuex?

from redux-beacon.

Comments (5)

ttmarek avatar ttmarek commented on May 24, 2024 1

No worries at all @kfinley, thanks for following up!

from redux-beacon.

ttmarek avatar ttmarek commented on May 24, 2024

Hey @sergioIGZ.

Perhaps. It shouldn't be too difficult. It could live under the main redux-beacon package. Something like redux-beacon/src/create-plugin.ts:

function createPlugin(
  eventsMap: EventsMap | EventsMapper,
  target: Target,
  extensions: Extensions = {}
) {
  const getEvents =
    typeof eventsMap === 'function'
      ? action => flatten<EventDefinition>([eventsMap(action)])
      : action => getEventsWithMatchingKey(eventsMap, action.type);

  return store => {
    const prevState = store.state;
    store.subscibe((mutation, state) => {
      const events = createEvents(
        getEvents(mutation),
        prevState,
        mutation,
        state
      );

      registerEvents(events, target, extensions, prevState, mutation, state);
    });
  };
}

I think that's pretty much it. Would you have any time available to test the above out, and perhaps prep a pr to add it to the repo?

from redux-beacon.

kfinley avatar kfinley commented on May 24, 2024

Hey @ttmarek

I'm interested in using this and have time to test this out and prep a PR to add it if no one else is on it atm.

from redux-beacon.

ttmarek avatar ttmarek commented on May 24, 2024

@kfinley As far as I know, nobody is working on it. Feel free to give it a go! Don't hesitate to reach out if you have any questions.

from redux-beacon.

kfinley avatar kfinley commented on May 24, 2024

@ttmarek I no longer work at the company I wanted to build this for. So for now (unfortunately) I no longer have the need for this so it's up for grabs from anyone.

from redux-beacon.

Related Issues (20)

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.