Giter Club home page Giter Club logo

Comments (11)

Havunen avatar Havunen commented on August 22, 2024 5

Okay keep in mind createElement is isomorphic and createVNode is monomorphic, this has significant difference in perf. Maybe we should write jsx:inferno to reduce overhead.

from inferno-typescript-example.

MKGaru avatar MKGaru commented on August 22, 2024 1

I made without babel example here

from inferno-typescript-example.

styfle avatar styfle commented on August 22, 2024

For comparison, my react-server-example-tsx does not use bable.

from inferno-typescript-example.

Havunen avatar Havunen commented on August 22, 2024

@MKGaru how does it work without babel-plugin-inferno ? that compiles divs into Inferno specific createVNode calls

from inferno-typescript-example.

MKGaru avatar MKGaru commented on August 22, 2024

@Havunen with createElement ( inferno-create-element ) and transpile jsx:react by typescript

from inferno-typescript-example.

Havunen avatar Havunen commented on August 22, 2024

Happy news!

Typescript 2.3 will ship support for custom transformers. I think we could create inferno-jsx-typescript plugin to transform jsx into createVNodes instead of createElement.

:)

microsoft/TypeScript#13940

from inferno-typescript-example.

Havunen avatar Havunen commented on August 22, 2024

This was btw delayed till 2.4 due to bugs in their API...

from inferno-typescript-example.

styfle avatar styfle commented on August 22, 2024

@Havunen I'm not familiar with the custom transformers, but TS 2.4 landed a week ago.

from inferno-typescript-example.

Havunen avatar Havunen commented on August 22, 2024

Btw. Initial work for custom TSX compiler is done! Have a look: infernojs/inferno#1154 but it needs testing! :)

from inferno-typescript-example.

Havunen avatar Havunen commented on August 22, 2024

babel 7 has support for typescript so this is the recommended way now.

from inferno-typescript-example.

Havunen avatar Havunen commented on August 22, 2024

This PR now removes babel: #18

from inferno-typescript-example.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.