Skip to content

How can I add external javascript libraries? #145

Closed Answered by raquo
gvlpedro asked this question in Q&A
Discussion options

You must be logged in to vote

Hi! That's quite a broad question, as different JS libraries require different integrations.

In general, you need to read the docs for the library in question (D3.js), and write Scala.js facades to its classes / functions / etc. that you need (or use ScalablyTyped facades, although I find it easier to write my own). Then, find the Laminar functions necessary to complete the integration.

You need to know how to use D3 classes / functions from plain JS, and once you know that, you will have more specific questions about how to integrate the library with Laminar. Once you have those specific questions (e.g. how to render a third party html element in Laminar, or how to connect observables to…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gvlpedro
Comment options

Answer selected by gvlpedro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants