0.0.6 • Published 2 years ago
deferreditemlisting v0.0.6
react-native-shared-components
Build components without repetition.
1. DeferredItemListing
System Requirements
- Node and npm installed
- MacOS, Windows and Linux are supported
Installation
- To install, run:
npm i deferreditemlisting
- Install the required dependencies:
npm i @react-navigation/native@5.9.0
npm i @react-navigation/stack@5.12.6
npm i react-native-gesture-handler@1.8.0
npm i react-native-safe-area-context@3.1.9
Usage
- Load the module in your component
import { DeferredItemListings, ParamsHelper } from 'deferreditemlisting';
- Initialize the endpoint, e.g:
const endPoint = `https://api.punkapi.com/v2/beers`
- Now we need to set our static Helper class
ParamsHelper.setObject(tempObj)
Method | Description |
---|---|
setObject() | - It sets the component which we can pass in navigate params. - It require one argument which is an Object {} where Object key is the Component and value is the Component itself we want to render for Flatlist items |
- Configurable/Required props for DeferredItemListings when navigating:
Prop | Type | Description |
---|---|---|
endPoint | string | Its the api endpoint which returns the data array which required in DeferredItemListing Component |
ContainerComponentKey | string | The component we need to pass for our flatlist data item to display according to our choice |
route | string | Its the route for navigating when user clicks on the flatlist item |
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you find a bug or would like to request a new feature, just open an issue. Your contributions are always welcome!
License
Distributed under the ISC License.
Contact
Soban Khan - info@empglabs.com
Project Link: https://github.com/SectorLabs/react-native-shared-components