Since running the JSX transformation is slower than not running it, you probably want to just precompile the JSX (using the jsx
binary provided by react-tools
) when you distribute the extension. That said, if you include JSXTransformer.js then there's a JSXTransformer.exec(...)
method which transforms and evals its argument.
Using JSX without <script type="text/jsx"> tag?
-
28-06-2023 - |
Pergunta
I'm working on a chrome extension, specifically the content script functionality which injects my js into a website.
Since I'm basically just working with a .js fil that gets injected, I am unable to make make this declaration which seems necessary for jsx to work.
<script type="text/jsx">
/**@jsx React.DOM*/
Is there any other way I can utilize JSX?
Solução
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow