---
description: >-
  Collection can initial your collection and start calling methods that returned
  by this api.
---

# Collection

### `collection("name of the collection")`

## How to use:

```jsx
const my_collection = Pleex.collection('myCollection');
// my_collection can be any name you want
// myCollection can be any name you want
```

## Arguments:

| parameter          | required | type   |
| ------------------ | -------- | ------ |
| Name of collection | yes      | string |

## Example:

```jsx
import React,{useEffect} from 'react';
import {Text} from 'react-native';
import {Pleex} from 'pleex';

const App = () => {

  useEffect(() => {
    // Initial Pleex here
    const my_collection = Pleex.collection('myCollection');
  }, []);

  return (
    <>
      <Text>Hello World</Text>
    </>
  );

};

export default App;
```
