# react-native-dynamic-render

> Render from Json object

Latest version **1.1.3** (published 2020-10-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-dynamic-render
pnpm add react-native-dynamic-render
yarn add react-native-dynamic-render
bun add react-native-dynamic-render
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2020-10-19 |
| First published | 2020-03-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 137 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Author | Mohsen Madani |
| Maintainers | moh3n95 |
| Keywords | js, react-native, render, json, dynamic |

## Links

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

## Dependencies (1)

- [react-uuid](https://npm.io/package/react-uuid.md) ^1.0.2

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.1.3 (latest) — 2020-10-19
- 1.1.2 — 2020-10-19
- 1.1.1 — 2020-10-19
- 1.1.0 — 2020-10-19
- 1.0.0 — 2020-03-24
- 0.1.0 — 2020-03-24

## README

# react-native-dynamic-render &middot; ![CI/CD](https://github.com/moh3n9595/react-native-dynamic-render/workflows/Continuous%20Integration/badge.svg) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/moh3n9595/react-native-dynamic-render/blob/master/LICENSE) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-orange.svg)](https://github.com/moh3n9595/react-native-dynamic-render/compare) [![codecov](https://codecov.io/gh/moh3n9595/react-native-dynamic-render/branch/master/graph/badge.svg)](https://codecov.io/gh/moh3n9595/react-native-dynamic-render)



<p align="center">
    <img src="./images/cover.png">
  <br>
  <p align="center">
    Render from Json object
  </p>
</p>

## Example

Online example: https://snack.expo.io/@moh3n95/react-native-dynamic-render

## Installation

```
npm i react-native-dynamic-render
```

## Usage

```

import DynamicComponent from "react-native-dynamic-render";
import { Text, View } from "react-native";

export default function App() {

  const mapComponents = {
    text: Text, // Or Your custom component
    view: View
  };

  const props = {
    name: "view",
    _uid: "123",
    children: [
      {
        name: "text",
        _uid: "1234"
      },
      {
        name: "text",
        _uid: "12345",
        props: null
      },
      {
        name: "view",
        _uid: "123456",
        children: [
            {
              name: "text",
              _uid: "1234567",
              children: "some foo bar",
              props: {
                  first: "text foo",
                  second: "text bar"
              }
            },
            {
              name: "text",
              _uid: "12345678"
            },

        ],
        props: {
            first: "view foo",
            second: "view bar"
        }
      }
    ]
  };

  return (
    <DynamicComponent
        {...props}
        mapComponents={mapComponents}
    />
  );
  
}


```

### Expected output

```
<View>
  <Text />
  <Text />
  <View
    first="view foo"
    second="view bar"
  >
    <Text
      first="text foo"
      second="text bar"
    >
      some foo bar
    </Text>
    <Text />
  </View>
</View>
```


## Contributing

Thank you for your interest in contributing! Please feel free to put up a PR for any issue or feature request.

## Give me a Star

If you think this project is helpful just give me a ⭐️ Star is enough because i don't drink coffee 😃

## License

This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/moh3n9595/react-native-dynamic-render/blob/master/LICENSE) file for details

## Author

Made with ❤️ by [Mohsen Madani](https://github.com/moh3n9595).

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