Code Monkey home page Code Monkey logo

actions's People

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  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  avatar

actions's Issues

Improve Sample App

The sample app is a mess with lots of actions linked between them.

The sample app should be separate into sections, one for each component that support actions.

Proposal: rename / remove "addAction", or add UIButton specific method to attach closure

Hi!

Thanks for this little library, I've been using Actions in production and really like it in general.
There's one thing that got me: for UIButtons, I saw that there's an addAction method, and started using it mindlessly, assuming it'd only trigger on .touchUpInside (which is I guess what 99% of the time what you're interested in if you're adding a closure to a button).
Then I kept adding more and more of those to the codebase, and the number of crashes kept increasing, and it has been really hard to figure out where they're coming from.
Then looked into the code and figured that addAction is triggered every time there's a UIControl action is received - but it was definitely not my first thought (basically only figured it out around 2-3 months in)

Which is completely fine, but this was not obvious to me from the method name. :)
Potentially this may have not been an issue if UIButton had a "addOnTouchUp" or a modified "addTap" method?
Is there any real usecase for "addAction" in general? Even using something like "onAnyAction" would make it 100% clear.

I'm writing this because it may happen to some other people, not just me:).

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.