williamtroup/Heat.js

Support for use in frameworks

Closed this issue · 3 comments

Hey William!

Really cool project. I saw it in TLDR newspaper in winter and put on my wish list to integrate into my Vue project like the fellow guy who opened the issue.

I quickly found out that this library is designed to be used from the browser and against to be used from within frameworks such as Vue or React.

It doesn't expose any functions and instead populates the global scope. There are also no types provided and there is no "easy" way to manage it from within the lifecycles of a Vue framework. I would totally understand if this is completely outside your scope.

It would be great if you could mention that in the documentation to save time for future tinkerers.

And if you think, you would ever have the desire to refactor to make friendly to the standard of ESM modules and expose various APIs to manually supply the element, it'd be amazing!

Hello,

I never had any scope to add framework support for it, as it's supposed to be managed using binding attributes. There are APIs available to add data manually to it though. Check the documentation :)

I do have plans for the future to open it up to frameworks. I will keep you informed.

Thanks

Framework support is coming in v3.2.0 by exposing the $heat global variable as an exported type called "heat.js".

Released.