# Getting started

> Full Documentation at <https://cacilie.gitbook.io/react-minimalist-table/>

Installing.

```
npm i -s react-minimalist-table
```

Copy this code at you project in order to have a fully responsive table.

```javascript
import './App.css';
import {CTable} from 'react-minimalist-table';
import {useEffect, useState} from 'react';

function App() {

  const [Data, setData] = useState([])
   
  useEffect(() => {
    fetch('https://jsonplaceholder.typicode.com/posts')
    .then(response => response.json())
    .then(json => setData(json))
  }, [])

  return (
    <div className="App">
        <CTable 
          caption={"Data"}
          data={Data}
        />
    </div>
  );
}

export default App;

```

#### Props.

| caption | Title of the table to be displayed       |
| ------- | ---------------------------------------- |
| data    | JSON array with the data to be displayed |

#### Data example.

```javascript
[{
    columnName: cellValue,
    columnName2: cellValue2,
}]
```

> CodeSanbox example: <https://codesandbox.io/s/react-minimimalist-table-simple-sample-d0kxk?file=/src/App.js>

![](/files/-MWGtzwLUI6OIG5jk3XN)


---

# 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://cacilie.gitbook.io/react-minimalist-table/master.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.
