# Hello jsgeoda!

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\\__&#x74;utorial> contains all the sample codes. You can clone the repository and run the examples locally.&#x20;

```
git clone git@githbu.com:lixun910/jsgeoda_tutorial.git
```

## Node.js

```javascript
const jsgeoda = require('jsgeoda');

// create jsgeoda instance
const geoda = await jsgeoda.New();

// print out "Hello jsgeoda 0.0.8"
console.log("Hello jsgeoda", geoda.version);
```

## Pure js

```markup
<html>
<head>
</head>
<body>
<script type="module">
import jsgeoda from 'https://cdn.skypack.dev/-/jsgeoda@v0.2.2-Lc34LnJ0L2k7CJpnhQri/dist=es2020,mode=imports/optimized/jsgeoda.js';
jsgeoda.New().then((geoda)=> {
    console.log('Hello jsgeoda', geoda.version);
});
</body>
</html>
```

## React

{% tabs %}
{% tab title="index.js" %}

```javascript
import { StrictMode } from "react";
import ReactDOM from "react-dom";
// import jsgeoda library
import jsgeoda from "jsgeoda";

const rootElement = document.getElementById("root");

// jsgeoda.New() function will create an instance from WASM
// object that you can used later for spatial data analysis
jsgeoda.New().then((geoda) => {
  ReactDOM.render(
    <StrictMode>
      <div className="App">
        <h1>Hello jsgeoda!</h1>
        <h2>version: {geoda.version}</h2>
      </div>
    </StrictMode>,
    rootElement
  );
});

```

{% endtab %}
{% endtabs %}

#### Try it yourself in the playground

{% embed url="<https://codesandbox.io/s/1-hello-jsgeoda-foq4j?from-embed=&file=/src/index.js>" %}
