title: React Native Remove Item and button
body: <h2>I want when I click button inside access file remove the same item in months array inside Home file.
  How can I solve this?</h2>
  <p>App.js
  this file conncet screen.</p>
  <pre><code>import {StyleSheet, View} from 'react-native';
  import {createStackNavigator} from '@react-navigation/stack';
  import Home from './src/components/Home';
  import {NavigationContainer} from '@react-navigation/native';
  import Access from './src/components/access';
  
  const Stack = createStackNavigator();
  
  const App = () =&gt; {
    return (
        &lt;NavigationContainer&gt;
          &lt;Stack.Navigator&gt;
            &lt;Stack.Screen name=&quot;Home&quot; component={Home} /&gt;
            &lt;Stack.Screen name=&quot;access&quot; component={Access} /&gt;
          &lt;/Stack.Navigator&gt;
        &lt;/NavigationContainer&gt;
    );
  };
  
  export default App;
  </code></pre>
  <p><code>ButtonCicle.js</code>
  this file make circle.</p>
  <pre><code>import { View, Text,TouchableOpacity } from 'react-native';
  import styles from './Styles/ButtonCircleStyles';
  
  export default function ButtonCicle({BtnName, onPress}) {
      return (
      &lt;TouchableOpacity style={styles.buttonContainer} onPress={onPress}&gt;
              &lt;Text style={styles.button}&gt;{BtnName}&lt;/Text&gt;
          &lt;/TouchableOpacity&gt;
      );
  }
  </code></pre>
  <p><code>ButtonCircleStyles.js</code></p>
  <pre><code>this file make style
  import {StyleSheet, Dimensions} from 'react-native';
  const height = Dimensions.get('window').height;
  const width = Dimensions.get('window').width;
  const styles = StyleSheet.create({
      buttonContainer:
      {
          backgroundColor: 'red',
          borderRadius: 50,
          width: width / 5,
          height: width / 5,
          justifyContent: 'center',
          marginStart: '4%',
          marginBottom: '4%',
      },
      button:
      {
          fontSize: 25,
          textAlign: 'center',
      },
  });
  
  export default styles;
  </code></pre>
  <p><code>Home.js</code>
  this file make array and onPress to another screen</p>
  <pre><code>import React from 'react';
  import {StyleSheet, View} from 'react-native';
  import ButtonCicle from './ButtonCircle';
  
  const Home = ({navigation}) =&gt; {
    const months = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
  
    const listbutton = months.map((i, key) =&gt; (
      &lt;ButtonCicle
        BtnName={i}
        key={key}
        onPress={() =&gt;  navigation.navigate('access') || alert(i)}
        /&gt;
    ));
    return (
      &lt;&gt;
        &lt;View style={styles.container}&gt;{listbutton}&lt;/View&gt;
      &lt;/&gt;
    );
  };
  
  const styles = StyleSheet.create({
    container: {
      flex: 1,
      backgroundColor: '#ecf0f1',
      padding: 8,
      marginTop: '10%',
      flexDirection: 'row',
      height: 300,
      flexWrap: 'wrap',
    },
  });
  
  export default Home;
  </code></pre>
  <p><code>access.js</code></p>
  <pre><code>import React from 'react'
  import { View, Text, Button } from 'react-native'
  
  export default function access({navigation}) {
      return (
          &lt;View&gt;
              &lt;Text&gt;Home&lt;/Text&gt;
              &lt;Button title='Click' onPress={() =&gt; navigation.navigate('Home')} /&gt;
          &lt;/View&gt;
      )
  }
  </code></pre>
  <p>I want when I click button inside access file remove the same item in months array inside Home file.
  How can I solve this?
  How create it ?</p>