Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I change ReactJS Project (folder) name?

Tags:

How can I change ReactJS project(folder) name, simply rename the folder name from routing(folder) to react-routing-example(folder).

I found few renaming questions in this stack overflow but they are related to React-native but not Reactjs.

Edit 1: while creating a reactjs app.. i followed the following command:

npm create-react-app router

Here router is my folder name.Now I want to change that name to react-router-example

Thanks in advance.

like image 880
Ramlal S Avatar asked Aug 30 '18 07:08

Ramlal S


People also ask

How do I name a react folder?

In React applications, there are 3 most common naming conventions: Camel case for file names, and pascal case for component names. Kebab case for file names, and pascal case for component names. Pascal case for both file names, and component names.


Video Answer


2 Answers

just rename the project folder then open package.json and change the project name to react-router-example

like image 119
Dvlpr Avatar answered Sep 21 '22 19:09

Dvlpr


you can first rename the folder from router to react-routing-example. then change the name from in package.json and package-lock.json.

Or for simplicity use the search tab in vscode to replace the name at once.

Here you can see - example

like image 43
Ankush Chauhan Avatar answered Sep 19 '22 19:09

Ankush Chauhan