React Native NativeModules on React web

Viewed 112

I have this code made for a React Native app that uses the camera for get some pictures and send it to some services:

import { NativeModules } from 'react-native';

const { Liveness, Autocapture } = NativeModules;

//etc..

But I don't understand what it does those NativeModules. If I surf to it specification, I can see this:

//node_modules/react-native/Libraries/react-native/react-native-implementation.js

get NativeModules() {
  return require('../BatchedBridge/NativeModules');
},

And the code on ../BatchedBridge/NativeModules

it has something like:

let NativeModules: {[moduleName: string]: Object} = {};
if (global.nativeModuleProxy) {
  NativeModules = global.nativeModuleProxy;
} else if (!global.nativeExtensions) {
// etc

So I wonder, how could I do something similar, but with React in a simple web, not using native elements from the camera, what is the deal with those NativeModules?

0 Answers
Related