I want to use javascript files in react js, I saw many answers where they told to add script src in index.html in this way :
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<title>React App</title>
<script src="../src/app.js"></script>
<script src="../src/helper.js"></script>
<script src="../src/sort-algorthms.js"></script>
</head>
<body>
<div id="root"></div>
</body>
</html>
but this is not working, please anyone help . even tried this - https://betterprogramming.pub/4-ways-of-adding-external-js-files-in-reactjs-823f85de3668
here is link to sandbox : https://codesandbox.io/s/trail-minipro-rxjz9?file=/public/index.html