SimonLab / react-tutorial

A React tutorial
0 stars 0 forks source link

Create a first react component #2

Open SimonLab opened 8 years ago

SimonLab commented 8 years ago

Should I create the component with jsx or just pure javascript?

mbasso commented 8 years ago

Hi, I think that jsx will be the right way. It's fantastic, easy and readable. Write big components in pure javascript will be very difficult... Remember that jsx compile into pure javascript, so there will be no differences in performance. An example is avaible here. It is also possible to write some jsx and see corresponding javascript here

SimonLab commented 8 years ago

Thanks @mbasso. I'm still playing with jsx and javascript modules and try to decide which one I prefere but it's true jsx is a bit more readable at the moment.