Version: latest

Platform

Description

The Platform component allows you to get information about platform your app runs.

Example

import React from "react";
import { Platform, Text, Scene, Prism } from "magic-script-components";
export default class MyApp extends React.Component {
render() {
return (
<Scene>
<Prism size={[1, 1, 0.2]} >
<View name="main-view">
<Text textSize={0.1} textColor={[0.5, 0.5, 0.5, 0.5]}>
{(Platform.OS, Platform.Version)}
</Text>
</View>
</Prism>
</Scene>
);
}
}

Element Properties

NameTypeDefault ValueDescription
OSstringn/aName of the OS
Versionstringn/aVersion of the OS