Closed yapcheahshen closed 9 years ago
thanks, i'll try that
Answer to your question: No, I don't think that's a cleaner syntax. It's pretty much the same to me.
JSX is designed for non-programmer, so I think it will be better to move the complexity from JSX tag to the function body.
How do you assume JSX is designed for non-programmer ? any references or links ?
https://www.youtube.com/watch?v=x7cQ3mrcKaY at 14:39 , Pete Hunt mentioned With JSX, It's easy for designers to contribute code.
that is why I think JSX is designed as a declarative way for designer to migrate from HTML/template.
2015-10-21 0:54 GMT+08:00 kmsheng notifications@github.com:
How do you assume JSX is designed for non-programmer ? any references or links ?
— Reply to this email directly or view it on GitHub https://github.com/karmapa/ketaka-lite/issues/56#issuecomment-149631418.
Pete Hunt was just saying JSX is friendly to designers. Have you thought about why react component doesn't separate the view and controller files like angular? The philosophy of React of doing this is because they think controller and view are supposed to be together, that's actually called a controller view pattern. We modify view and controller in the same file.
Based on this, I don't think removing double semicolons will help. When a designer modify the component file, it's already a mess and they need to be trained. There's nothing to do with the double semicolons.
this is a minor coding style issue, I am fine with any style. you can use whatever you like, as long as it is easy to maintain , easy to understand and easy to use by the programmers (not me) in Dharma treasure association.
2015-10-21 14:49 GMT+08:00 kmsheng notifications@github.com:
Pete Hunt was just saying JSX is friendly to designers. Have you thought about why react component doesn't separate the view and controller files like angular? The philosophy of React of doing this is because they think controller and view are supposed to be together, that's actually called a controller view pattern. We modify view and controller in the same file.
Based on this, I don't think removing double semicolons will help. When a designer modify the component file, it's already a mess and they need to be trained. There's nothing to do with the double semicolons.
— Reply to this email directly or view it on GitHub https://github.com/karmapa/ketaka-lite/issues/56#issuecomment-149797811.
Haha, good to hear that : )
I could've removed all double semicolons with arrow functions binded, just don't feel like doing it. I am fine with double semicolons, it doesn't bother me. If it's a serious performance issue, then I'd be very happy to change em.
Anyways, it was very nice to discuss with you about this kind of topic : )
instead of
onclick () { }