Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:class no longer supports keywords (since 0.8.0) #367

Closed
Dexterminator opened this issue Apr 24, 2018 · 3 comments
Closed

:class no longer supports keywords (since 0.8.0) #367

Dexterminator opened this issue Apr 24, 2018 · 3 comments

Comments

@Dexterminator
Copy link

Before Reagent 0.8.0 it was possible to use a keyword as a class (this seems to be facilitated by convert-prop-value being called?).

Reagent 0.8.0 breaks this by changing e.g the keyword :highlight to the string ":highlight" (including the :, indicating that name hasn't been called). In earlier versions of Reagent this would result in the string "highlight" and a working class.

Possibly introduced in #323?

@Deraen
Copy link
Member

Deraen commented Apr 24, 2018

Yes, new code is missing convert-prop-value after stringify-class.

@Deraen
Copy link
Member

Deraen commented Apr 27, 2018

I've been trying to reproduce this but I'm unable to, in both Reagent demo site / test suite, or in a application using Reagent.

I've tried for example [:div {:class :foo}] and it is correctly rendered as <div class="foo">.

@Dexterminator Could you provide more specific example and information about your environment?

@Deraen
Copy link
Member

Deraen commented Apr 27, 2018

Oh and right after writing the message, I found at least one problematic case: [:p.a {:class :b}].

Deraen added a commit that referenced this issue Apr 27, 2018
@Deraen Deraen mentioned this issue Apr 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants