@juanpablocs/rn-slider-carousel
v0.0.5
Published
``` npm install @juanpablocs/rn-slider-carousel ``` ## Step 1: Implement slider
Downloads
1
Readme
Getting Started
npm install @juanpablocs/rn-slider-carousel
Step 1: Implement slider
import React from 'react';
import SliderCarousel from '@juanpablocs/rn-slider-carousel';
function App(): React.JSX.Element {
const markers = [
{
lat: -12.1207698,
lng: -77.0304079,
title: 'KFC Miraflores',
id: '1',
image:
'https://lh3.googleusercontent.com/p/AF1QipMgTanJHISBSaD6fxt7qbBUFdPyumYn_IV8_acR=s1360-w1360-h1020',
},
// ...
];
return (
<View>
<SliderCarousel entries={entries} onCurrentItem={console.log} />
</View>
)
}
Step 2: Start your Application
Let Metro Bundler run in its own terminal. Open a new terminal from the root of your React Native project. Run the following command to start your Android or iOS app:
For Android
# using npm
npm run android
# OR using Yarn
yarn android
For iOS
# using npm
npm run ios
# OR using Yarn
yarn ios
If everything is set up correctly, you should see your new app running in your Android Emulator or iOS Simulator shortly provided you have set up your emulator/simulator correctly.
This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively.
Congratulations! :tada:
You've successfully run and modified your React Native App. :partying_face: