GithubHelp home page GithubHelp logo

Comments (4)

mike-thompson-day8 avatar mike-thompson-day8 commented on May 11, 2024

Problem Definition
Happens if you:

  • mistakenly supply undoable as middleware ...
  • ... instead of correctly supplying (undoable "some explanation")

undoable is a middleware factory. You must call it (with a parameter) to get middleware.

So this ticket is asking for the mistake to be reported because its a mistake which currently passes silently, and it is a bit baffling to debug.

Solutions:
Unfortunately undoable is a function (middleware factory), just like a true middleware function would be. So detection of this mistake is a bit hard.

Doubly so because you can do this (undoable some-function) . So we can't even check at middleware composition time for a non fn parameter.

Will dwell on it.

from re-frame.

mike-thompson-day8 avatar mike-thompson-day8 commented on May 11, 2024

Okay, I've figured out a way of doing this via metadata. But I'm stuck on this question:
https://groups.google.com/forum/#!topic/clojurescript/KuGrBMqzO1o

from re-frame.

ul avatar ul commented on May 11, 2024

not sure which answer will arrive faster to you, so duplicate here and in cljs group

defn attaches metadata to var:

(defn ^{:a 1} f [] true)
#<function cljs$user$f(){
return true;
}>
=> nil

(meta #'f)
=> {:ns cljs.user, :name f, :file "<cljs repl>", :end-column 16, :source "^{:a 1} f", :column 1, :line 1, :end-line 1, :arglists ([]), :doc nil, :test nil, :a 1}

note presence of :a key in the end

from re-frame.

mike-thompson-day8 avatar mike-thompson-day8 commented on May 11, 2024

Fixed in 78dacf5

Will be a part of v0.4.1

from re-frame.

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.