facebook / react

The library for web and native user interfaces.
https://react.dev
MIT License
228.38k stars 46.73k forks source link

Allow namespacing in component names in JSX #74

Closed sophiebits closed 10 years ago

sophiebits commented 11 years ago
23:07 < balpert> can we add <Namespaced.Things /> to JSX?
23:07 < jwalke> I like that you chose the dot!
23:07 < jwalke> Keep it javascript-first.
23:07 < balpert> yes
23:08 < balpert> translating colon to dot would be absurd
23:08 < balpert> (in my opinion)
23:08 < jwalke> So you could have var MyComponentsPackage = {Typeahead:
                R.createClass.. }
23:08 < jwalke> <MyComponentsPackage.Typeahead />
23:08 < jwalke> I like it.
23:08 < jwalke> Make an issue!
jordwalke commented 11 years ago

:+1:

petehunt commented 11 years ago

+1

hojberg commented 11 years ago

+1

benjamn commented 11 years ago

I'mma jump on the :+1: bandwagon too. Great idea.

jtmalinowski commented 11 years ago

I don't want to keep duplicated issues opened so just to sumup: @jeffmo said it makes sense to implement "namespacing" using colons as opt-in, config-defined option, where one of the possibilities would be a member expression. I don't have enough time to implement it this way, so I closed my issue. More on why&how in jeffmo's final comment https://github.com/facebook/react/issues/221#issuecomment-22079785 and in https://github.com/facebook/react/issues/221 in general

vladise commented 10 years ago

+1

flashjames commented 10 years ago

+1

percyhanna commented 10 years ago

A non JavaScript-first implementation that wouldn't require changes to facebook/esprima: #1221

syranide commented 10 years ago

PR landing for JSX member expressions https://github.com/facebook/react/issues/760, can close this.