reactjs – Sharing of data received via JSON to other files

I have a problem to share data received by a personal API via

On my initial File, i have:

        .post('myAPIURL', this.state)
        .then(response => {

I need to share with other files to use this header. For example, on second file:

    const res = await'myAPIURL', { hello: 'world' }, {
  headers: {
    'token': // I need for the here

As there is an exchange of files, I am losing data and I am unable to simply export them.
Help me, plz!