Skip to content

TSX Support

We can not only write Mettle using JSX syntax, but also using TSX syntax.

  • TSX combines the type checking function of TypeScript, which can capture type errors at compile time, reduce runtime errors, and improve code reliability.
  • TypeScript's smart prompts and auto-completion functions are still valid in TSX, helping developers write code faster and reduce spelling errors.
  • Type annotations and interface definitions make code easier to read and maintain, especially in large projects, which can significantly reduce maintenance costs.

Use

createMettleApp The project scaffolding tool is installed by default, just select the mettle-tsx or mettle-tsx-apps template.

Released under the MIT License.