Is it wrong to use jsx with Quasar?

  • Hi, guys! First of all: I am loving quasar. Such a complete tool!

    I have used both Angular and React. And now I am trying vueJs, and I really prefer to use render functions with JSX over template.

    I already added the jsx babel and eslint plugin to make it work with quasar. It is working like a charm. But, as I can’t find any examples, I wonder if what I am doing is wrong or unrecommended.

    I started this project yesterday and I didn’t test all the corners. It is working perfectly in quasar dev mode, on browser. I wonder what is the probability to fail on mobiles or when build to production.

    Can you give me some advices on this subject?

    Thank you all in advance!

  • I have never tried using JSX with Quasar, and seldom used it with Vue (template syntax has better directive modifiers and arguments, and it’s awesome with Pug).

    However it shouldn’t fail. Both JSX and templates are compiled under the hood to vanilla render functions (even though JSX requires plugins, that you seem to be already using). Razvan himself use render functions a lot (source), without JSX.

    I don’t know anybody using Quasar with JSX, but, if you like it this way, I suggest you to try it (on production, mobile, etc.) and, if you find any bug, reporting it on GitHub.

  • Admin

    You can use JSX with no problems. Have no fear.

  • @rstoenescu all good with JSX except I can’t figure out how to use directives (such as v-close-overlay), little bit of help here would be nice 😉

  • @matepaiva would you mind to explain what is the best way to add jsx babel to the latest quasar? I would like to use some jsx, but I can’t figure out the right way to do it.

  • @matepaiva never mind, I figured out. I had a problem because of an older quasar cli in project, probably. On new quasar project everything is working fine.

Log in to reply