c8r / x0

Document & develop React components without breaking a sweat

Home Page:https://compositor.io/x0/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem with template strings in .jsx

RoyalIcing opened this issue · comments

Having a problem with className prop in a .jsx file. If it is a string, it is fine:

---
variation: primary
class: 
content: Click me!
---
<div>
  <div>Hello</div>
  <button className={'btn'}>{ props.content }</button>
</div>

But if becomes a template string, it fails:

---
variation: primary
class: 
content: Click me!
---
<div>
  <div>Hello</div>
  <button className={`btn`}>{ props.content }</button>
</div>

The error in the browser is:
Module parse failed: Unexpected token (23:22)\nYou may need an appropriate loader to handle this file type.

Thanks for the detailed bug report! Could you please try installing @next and see if it resolves your issue?

npm i -g @compositor/x0@next

Yep has fixed it! Thanks :)

Two questions — are you looking for contributors, and are you happy to have other libraries than React?

Great! 🎉

are you looking for contributors

We'll always happily accept contributions for bug fixes and features 💟. Though before working on feature development we recommend opening up an issue to discuss it first.

are you happy to have other libraries than React?

For now we'll likely stick with just React support to keep the library as simple as possible. That said, it is definitely something we'll revisit in the future.