ddeeffw JSX is the official way to write components for Flarum. The other option is to use the Mithril hyperscript directly. jQuery should only be used for use cases outside of the single page app, or when there is no way to do things using the Mithril templates and lifecycles.
There's nothing special to do. When you compile your javascript as described in our documentation https://docs.flarum.org/extend/frontend.html#transpilation-and-file-structure JSX is automatically parsed and converted to Mithril templates.
You can name your files .jsx
(respectively .tsx
for typescript) but I don't think it's a requirement. I think JSX will be parsed in all files.
For an example you can see how the Tags extension has its components described with JSX inside of the Mithril component. For example the TagsPage
: https://github.com/flarum/tags/blob/master/js/src/forum/components/TagsPage.js#L47
If you have difficulty using JSX for a particular use case, please describe what you are creating, we can point to useful examples 🙂