-
I was asked to support SolidJS in my project jQuery Terminal. And I was wondering how to use any JavaScript libraries with SolidJS. Since SolidJS is a compiler I'm not sure how I should go about it. I was searching but I was not able to find anything that explain how to use JavaScript libraries (like jQuery) with SolidJS. With React you have plenty of tutorials how to integrate 3rd party code, but nothing for Solid. I can use script tags and globalThis, but there is probably a better solution. Also it would be nice if this work with TypeScript. Any hints how to integrate JavaScript libraries with Solid? Or maybe someone can point me to some documentation on this subject. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
There is actually no need to add explicit support for SolidJS. You would just take a ref and apply the library API: const Terminal = (props) => <div ref={(node) => $(node).terminal(props.commandHandler, props.options)}></div>; |
Beta Was this translation helpful? Give feedback.
There is actually no need to add explicit support for SolidJS. You would just take a ref and apply the library API: