Random experiment : Accessing Camera in React Native

Create a new react native project by running the command

Open the App.js folder and delete everything.

Primary idea->

Our app will have two components one PendingView(this is displayed when the camera is not ready) and The App Component .

First thing first create PendingView.js file and add

Now go to android->app ->build.gradle (Do not confuse with the other files)

add the last lines in defaultConfig

In the cmd run->

In App.js add->

Now start the metro builder

Run ->

Output

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Why Angular Teams Fail at Code Sharing and How This Monorepo Approach Will Fix It

Day 36 | Camera Shake: 2D Space Shooter Series 04

Create an ADVANCED JavaScript Wheel Image Carousel

Native form validation — part 1

My website scrape quest.

How to Create your Own Express Server

Don’t use collection directly

How to write (or customise) a templating engine?

Cookie cutter and dough

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Nilay Paul

Nilay Paul

More from Medium

React — High Order Components Done Right

Difference Between React JS vs React Native by Macrocosm

React vs React Native