title: React-native "Value for value cannot be cast from string to double"
body: <p>I started my studies recently on react-native, I had a doubt about this method.
  'Alert.alert (' randomNumber ');'</p>
  
  <p>when trying to display a variable of type int / float, I get the following error. "react native value for value can not be cast from string to double".</p>
  
  <p>To solve this, I made the conversion from int / float to string before trying to display, but I would like to understand why the error ... complete code below.</p>
  
  <pre><code>    /* eslint-disable arrow-body-style */
  
  import { View, Button, Text, AppRegistry, Alert } from 'react-native';
  
  const React = require('react');
  
  const gerarNumero = () =&gt; {
      let numeroRandomico = Math.random();
      numeroRandomico = Math.floor(numeroRandomico * 10);
      numeroRandomico = String(numeroRandomico);
      Alert.alert(numeroRandomico);
  };
  
  const App = () =&gt; {
      return (
          &lt;View&gt;
              &lt;Button title="Gerar um número randômico" onPress={gerarNumero} /&gt;
              &lt;Text&gt;Meu primeiro app &lt;/Text&gt;
          &lt;/View&gt;
      );
  };
  
  AppRegistry.registerComponent('app2', () =&gt; App);
  </code></pre>