React is a great framework to get a project up and running quickly. Running npx create-react-app my-app will give you a functioning website in seconds. That being said, it’s always a good idea to change your meta data before sharing your React app widely.
Doing so is easy!
Change meta data
Navigate to index.html in the public directory and find the head tag.
See that text Web site created using create-react-app? Let's change it.
In the meta tag, change content="Web site created using create-react-app" to a short description of your website.
This type of information is shared whenever you embed your website on a social media page, so creating a short and informative description will let your user know what kind of website they’ll be viewing.
Change the title
At the bottom of the head tag you’ll find the title tag. This title corresponds to the text you see on the browser tab.
Change the name of the React App to whatever you’ve named your website.
There’s other boilerplate code you may want to modify in the index.html file and elsewhere. Personally, I find it useful to delete the image files create-react-app comes with (with exception to the favicon file).
A favicon is the 16 x 16 px image next to the title of your website (usually a logo). React uses their own logo, but you can easily delete that file and replace it with your own logo. Be sure to keep the file name the same for a quick change.
These quick changes can make a great impression when sharing your app. Not only are they descriptive (which is what search engines love), they also show that you pay attention to detail. The next time you share your app, be sure to make these changes.
Top comments (2)
Change your README.md. I'm not sure there's anything more annoying than seeing the CRA default in a GitHub repo.
That too! Thanks for sharing.