Option 1:You can make a node js file in your react project then run a node ./nodescript.js in your hosting server.
Option 2: make a small node js server that you will send a request to from your react app (using fetch or axios)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
React is a client side application, and client side application can't access file system.
Please,can you help me regarding this?,
What exactly do you want to accomplish?
i want to create react app and i use fs.writeSync
Yes, but what kind of file do you want to write, and why? Maybe writeSync isn't the solution.
i want to save data in the form of json file in local
Option 1:You can make a node js file in your react project then run a node ./nodescript.js in your hosting server.
Option 2: make a small node js server that you will send a request to from your react app (using fetch or axios)