I am creating a react.js application and in src folder i have creater two folders one for components and one for api. Now I want to import my data from a file that is in api folder how do I get the path of it? because I am trying '../../api' but got an error with this line. Please help! Below is the error.
You should right-click the required file in the API folder in vscode and click on get relative path(make sure the file where you want to access the API folder is the active file) also you need to use 3
../ as from the first you go to cards and then componenets and then src folder where the api folder resides
but from your error picture you haven't specified a file name and you can import a whole folder so you need to specific a filename after