# react-native-multicomponent

> To add and delete a component multiple times

Latest version **1.0.0** (published 2018-05-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-multicomponent
pnpm add react-native-multicomponent
yarn add react-native-multicomponent
bun add react-native-multicomponent
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-05-28 |
| First published | 2018-05-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | bygirish |
| Keywords | react-native |

## Links

- npm: https://www.npmjs.com/package/react-native-multicomponent
- Repository: https://github.com/bygirish/react-native-multicomponent
- Homepage: https://github.com/bygirish/react-native-multicomponent#readme
- Issues: https://github.com/bygirish/react-native-multicomponent/issues
- npm.io page: https://npm.io/package/react-native-multicomponent

## Dependencies (1)

- [native-base](https://npm.io/package/native-base.md) ^2.4.5

## Recent versions

- 1.0.0 (latest) — 2018-05-28

## README

# react-native-multicomponent

A `<EwMultipleComponentValue>` component for React Native to add and delete a component multiple times.

## Installation

`npm install multicomponent --save`

## Usage
```javascript
<EwMultipleComponentValue
  component = { <Test /> }                  // Component to render multiple times
  componentStateArray = { testArray }       // Array containing state value of the component.
  isAddButtonVisible = { true }             // To show add button for component
  otherDetails = {{ testDetails: 'test' }}  // To pass custom details to the component
  isDeleteButtonVisible = { false }         // To show delete button for component
  onAddButtonPressed = { () => this.addCommentToServer() }  // To add custom functionality when add button is clicked
  updateParentState = { (componentState,componentKey) => this.updateParentState(componentState,componentKey) }  // To update parent state when component state is changed
  addLabel = "Add Component"     // Label for the add button
  showDeleteAlertbox = { true } // To show delete alertbox of component is deleted.
  alertboxData = {{ heading: 'Test', message: 'Do you want to delete this ?'  }} // To add custom heading and messaging if show alertbox is true
/>
```
## Demo (Add button)

<img src = './demo.gif' />

## Demo (Delete button)

<img src = './demo-delete.gif' />

---
_Source: https://npm.io/package/react-native-multicomponent · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
