I need to use atob function in a React project I'm working on, but VSCode puts a line through the function call and on hover I get the following message:
This function is only provided for compatibility with legacy web platform APIs and should never be used in new code, because they use strings to represent binary data and predate the introduction of typed arrays in JavaScript. For code running using Node.js APIs, converting between base64-encoded strings and binary data should be performed using
Buffer.from(str, 'base64')andbuf.toString('base64').
The code still works as expected, but I was wondering if it is safe to use atob or there is maybe some other solution which I am unaware of?