expo/examples

"window.performance.clearMeasures is not implemented" warning

Closed this issue · 2 comments

Describe the bug
there are various warnings on phone screen about window.performance

To Reproduce
Steps to reproduce the behavior:

  1. npx create-react-native-app my-app -t with-react-three-fiber myFiber
  2. cd myFiber
  3. expo start
  4. scan qr code with your phone (mine is android)

Expected behavior
no warnings on every refresh. it is frustrating.

Screenshots
Screenshot (12 Tem 2020 15_59_06)

Desktop (please complete the following information):

  • OS: ElementeryOS (Linux)
  • Browser [chrome]
  • Version [38]

Smartphone (please complete the following information):

  • Device: [General Mobile 9 Pro]
  • OS: [android 9]
  • Browser [expo]
  • Version [38]

Additional context
my code:

import React from "react";
import { StyleSheet, View } from "react-native";
import { Canvas } from "react-three-fiber";

const Box = () => {
  return (
    <mesh>
      <boxBufferGeometry attach="geometry" args={[1, 1, 1]} />
      <meshBasicMaterial attach="material" color="red" />
    </mesh>
  )
}

export default function App() {
  return (
    <View style={styles.container}>
      <Canvas>
        <Box />
      </Canvas>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: "#333",
  },
});

you can polyfill those functions if you want, but they don't exist in the react-native environment and so warnings like this will happen. they don't impact functionality

This issue is related to the react-three-fiber package not much we can do about it here.