Giter Club home page Giter Club logo

Comments (10)

atroche avatar atroche commented on August 20, 2024

I'm having a similar problem.

from rum.

andromorv avatar andromorv commented on August 20, 2024

So, i've spent a couple of hours fighting this issue and lost. But i've found how render method will look like.

For example, for this component

(defc my-component < static [props]
  (let [x (:x props)]
    [:div {:class-name "test"}
      [:span "Test"]
      [:span (str "Test" x)]]))

render method will look like

;; Some brainfuck action here

(fn []
  (this-as this
           (let [state (state this)
                 [dom next-state] ((fn [state]
                                     [(apply (fn [props]
                                               (do (let [x (:x props)]
                                                     (js/React.createElement "div" {:className "test"}
                                                                             (js/React.createElement "span" nil "Test")
                                                                             (js/React.createElement "span" nil (str "Test" n))))))
                                        (::args state))
                                      state]) @state)]
             (vreset! state next-state)
             dom)))

So, I can't even imagine why this is happening.

from rum.

tonsky avatar tonsky commented on August 20, 2024

So key warning happens because sablono puts it into an array if component body does not start with vector. I’ll see if I can report it to them or work around it by myself

from rum.

piranha avatar piranha commented on August 20, 2024

It's reported at r0man/sablono#57

from rum.

quetz avatar quetz commented on August 20, 2024

Is there any fix to this? I'm getting this with sablono 0.5.3 and rum 0.6.0
Everything is fine if I wrap contents of let-block with (sablono.core/html ...) but it looks like a workaround...

from rum.

r0man avatar r0man commented on August 20, 2024

@tonsky This should be fixed in sablono 0.6.0.

from rum.

tonsky avatar tonsky commented on August 20, 2024

Awesome! Will check tomorrow

On Sun, Feb 14, 2016 at 8:41 PM r0man [email protected] wrote:

@tonsky https://github.com/tonsky This should be fixed in sablono 0.6.0.


Reply to this email directly or view it on GitHub
#33 (comment).

from rum.

kennyjwilli avatar kennyjwilli commented on August 20, 2024

Status update on this? Can we update sablono to 0.6.0?

from rum.

tonsky avatar tonsky commented on August 20, 2024

You can do it locally via :exclusions, it won’t break anything. Next
version of rum will also contain updated dependency

On Wed, Mar 2, 2016 at 2:00 AM Kenny Williams [email protected]
wrote:

Status update on this? Can we update sablono to 0.6.0?


Reply to this email directly or view it on GitHub
#33 (comment).

from rum.

tonsky avatar tonsky commented on August 20, 2024

[sablono 0.6.3] was included in [rum 0.7.0], which should have this issue fixed

from rum.

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.