React JSX inside gantt.templates.task_text

Can I use JSX as a return for the gantt.templates.task_text function?

const Div = () => <div>test</div>

gantt.templates.task_text  = function(start,end,task){
            return <Div/>

If you add this code to the js file with the implementation of the component (Gantt.js in our demo) - that wouldn’t work.
While you are working with JSX - you must also use a compiler (for example babel, gulp, webpack etc.) that transforms JSX to JS. If you do that - the provided code should work correctly.