Native Modules

Native Modules in React 360 give the ability to access functionality only available in the main browser environment. In the game, we will use the AudioModule in Native Modules to play sounds in response to user activity, and the Location module that gives access to window.location in the browser to handle external links. These modules can be accessed in index.js as follows:

import {    ...  NativeModules} from 'react-360'const { AudioModule, Location } = NativeModules

Get Full-Stack React Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.