React gravar no arquivo json

fs.writeFile('./myFile.json', JSON.stringify(updatedJSON), (err) => {
        if (err) console.log('Error writing file:', err);
    })
})
Homely Hamster