Open Eisenspalter opened 5 years ago
I saw some jsx stuff here. Seems like the TSX is dependent on the typescript support, I was trying to used it, but seems like is missing some typing support, that was started and not sure if completed. about decorators there's a nice library that I'm using https://github.com/gnaeus/knockout-decorators, not sure if some ideas could be native supported by tko as separated module.
TKO has native JSX support now. The transpiler (webpack, babel, typescript) needs to use ko.jsx.createElement
and ko.jsx.Fragment
for the respective React equivalents (React.createElement
and React.Fragment
).
For example, in Babel, this would look like:
plugins: [
["@babel/plugin-transform-react-jsx", {
"useBuiltIns": true,
"pragma": "ko.jsx.createElement",
"pragmaFrag": "ko.jsx.Fragment",
"throwIfNamespace": false,
}],
]
Which new features, something like native JSX/TSX support or Decorators does TKO offer?