# 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>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://xunli.gitbook.io/jsgeoda/user-guide/hello-jsgeoda.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
