rebem / rebem-jsx

:symbols: Babel plugin for reBEM jsx transformations
MIT License
27 stars 1 forks source link

Add inheriting the parent block #4

Closed a-x- closed 8 years ago

a-x- commented 8 years ago

I want use it like this:

<div block="button">
  <span elem="text">{props.children || props.text}</span>
</div>

Current api is not cool, because className="button__text" is more short and simple than block="button" elem="text"

Is it possible?

deepsweet commented 8 years ago

is more short and simple

the main (and the only) goal is to have an abstraction over raw classnames.

Is it possible?

not at this moment. we have to think twice before implementing any inheritance because it has too many pitfalls.

a-x- commented 8 years ago

ok,

our bem-xjst bemjson template engine supports inheritance and it does not cause serious problems AFAIK

mistadikay commented 8 years ago

Neither React, nor JSX are template engines. You should probably try raw React first and read its documentation

a-x- commented 8 years ago

lol, ok)