This chapter shows how to load jsgeoda library in Node.js, pure js(html page) and React. The jsgeoda_tutorial repository https://github.com/lixun910/jsgeoda_tutorial contains all the sample codes. You can clone the repository and run the examples locally.
import { StrictMode } from"react";import ReactDOM from"react-dom";// import jsgeoda libraryimport jsgeoda from"jsgeoda";constrootElement=document.getElementById("root");// jsgeoda.New() function will create an instance from WASM// object that you can used later for spatial data analysisjsgeoda.New().then((geoda) => {ReactDOM.render( <StrictMode> <divclassName="App"> <h1>Hello jsgeoda!</h1> <h2>version: {geoda.version}</h2> </div> </StrictMode>, rootElement );});