How do I export the data under state to another file?(react-native)

  android, ios, react-native, reactjs

I want to export the ‘hscnumber’ variable here to another file. How can I do it?

export default class test extends React.Component {
  constructor(props) {
    super(props);
    this.getData();
    this.state = {
      h:0,
      hscnumber:0,
   };
  }

Source: Android Questions

LEAVE A COMMENT