Code Monkey home page Code Monkey logo

hooked-on-redux's People

Contributors

dependabot[bot] avatar harryhope avatar torthu 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  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  avatar

Forkers

torthu

hooked-on-redux's Issues

When you don't need a tuple

First off congratulations on such an amazing and clean take on hooks use in redux.

I think that for this library (or documentation) is missing 2 use cases for it to be used in a real-world project.

  1. Call an action that sets a value on the store, but it's not needed in that component.
  2. get a specific value without needing a setter function

There are other ways of doing this in Redux, but I was wondering about the best way to solve this problem in a "best-practice" with this library

touple doesn't work correctly on a complex redux store.

As I have been trying to integrate hooked-on-redux in an existing project that contains multiple reducers there has been an issue that the getter and setter are working differently.

To be able to retrieve the value correctly I have to include the name of the reducer. However, this breaks the second part of the touple. To get the correct behavior there has to be something like this:

	const [loading] = useHookedOnState('flamingo.loading', true);
	const [, loading] = useHookedOnState('loading', true);

This is not even a possible solution because if the default state is an {} then redux gets into an infinite loop.

Great repo, though why long name?

Awesome work and I think I have been waiting for something like this without realizing

Though why useHookedOn... and hooked-on-redux?

why not names like redux-hooks and useReduxState?

Just wanna understand the naming bit better. Thanks ๐Ÿ™‚

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.