npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

moy-redux

v1.0.3

Published

Give a solution for moy-dom state management.

Downloads

14

Readme

moy-redux

haven't you heard redux?

it‘s the same principle as that.

Understand the concepts

  • IO -> a variable that can changed anytime and anywhere(effect)
  • Task -> an asynchronous task that we used in functional programming(like promise, but actually not the same)
  • store -> like redux store
  • state -> current store state
  • dispatch -> like redux, dispatch an applyer
  • applyer -> an applyer is a Map that just like [applyerName, applyerFunction]. when dispatch an applyer, they can get the applyerName and execute it's applyerFunction(Note: applyerFunction must return a Task)
  • subscription -> listener for state changed that it can execute automaticly
  • subscribe -> add listener for store(Note: listener just a function, you can use compose or parallel to add more than one function)

How it works

  1. you should create a store(with rfStore Function), right?
  2. when you did step 1, you can get an object that contains state(IO)、dispatch、subscribe and rfStore. what does this properties do, you may got it as mentioned above except rfStore.the rfStore Function is designed for this case: you should clearly change the store's state and applyers to a new state and new applyers such as route changed
  3. you can dispatch an applyer with payload
  4. the store get the action and find the apllyer in it's applyers. we use Maybe monad for this case if your applyName doesn't exist
  5. if can't find the applyer, nothing happened(will not take the following steps). if exist, we use ap function to execute this function
  6. store get the applyerFunction return values Task
  7. use chain to remove Maybe monad and fork Task and changed store's state to a new state ({...state, ...changes}) with this changes
  8. when state changed, the subscription will called(if exist)
  9. waitting for a new dispatch
  10. Note: when you use rfStore to set a new state and new applyers, the subscription will be called(store'sstate changed right?)

License

MIT

Copyright (jp) 2018-present murakami