Reputation: 969
I was learning React and came across public folder which contains html file, favicon and the others. The question is for what public folder is actually created? and what should it contain?
Upvotes: 1
Views: 319
Reputation: 8765
Just static contents that do not need to compile (.html, .svg, .jpg, ...).
Just like www
folder for ASP.net Core projects.
But It is your desition to put them there or somewhere else.
Upvotes: 2
Reputation: 499
React is a JavaScript library that needs to be "compiled" into code that the browser understands, so the public
or build
or dist
folders are for holding the output of the compilation process or if you'd like, they store your artifact.
Just like target
folder for Java projects.
Upvotes: 0