In the end what did the trick was changing the file format from JavaScript to JavaScript React on the bottom toolbar. I'm publishing it here for future reference since I didn't find any documentation on this topic.

In addition to the above. If you click 'Configure File Association for .js' you can set all .js files to Javascript React

Answer from omer727 on Stack Overflow
🌐
Code Beautify
codebeautify.org › react-formatter
React Formatter Online
React Formatter helps to format any not formatted or ugly react script and helps to save and share the react script.
🌐
CodeSandbox
codesandbox.io › examples › package › react-formatter
react-formatter examples - CodeSandbox
Use this online react-formatter playground to view and fork react-formatter example apps and templates on CodeSandbox.
Discussions

Formatter in VsCode for React - javascript
When I save or format my React code with Ctrl + Shift + F the code below, is formatted in a strange way. More on stackoverflow.com
🌐 stackoverflow.com
VSCode formatter for React?
We use prettier at work. You just need to configure it correctly. More on reddit.com
🌐 r/reactjs
7
2
May 11, 2021
What's your approach to auto-formatting your project in VS Code?
Prettier plugin: DO NOT change any of the settings and setup a .prettierrc in your project. Set Prettier as your formatter and format on save. And then thankfully forget about formatting ever again, for you and your team. EDIT: Set your formatter with "Format document with..." > "Configure Default Formatter" More on reddit.com
🌐 r/react
13
2
March 17, 2023
React Library for Code editor and Formatter
Codemirror or ace More on reddit.com
🌐 r/reactjs
5
2
October 8, 2021
People also ask

How to use React formatter online?
To use React Formatter online, paste your tidy React code in input editor or simply upload React file, then click on format button.
🌐
textcleaner.net
textcleaner.net › home › react formatter
React Formatter and Beautifier to format react online
Is React formatter privacy friendly?
Yes, our React formatter online tool is privacy friendly and formatting React is done locally in your browser. No data will be stored in our server.
🌐
textcleaner.net
textcleaner.net › home › react formatter
React Formatter and Beautifier to format react online
🌐
Holt
react-v9.holt.courses › lessons › tools › code-formatting
Code Formatting – Complete Intro to React
So that our tool can know this is a Prettier project, we're going to create a file called .prettierrc and put {} in it. This lets everyone know this is a Prettier project that uses the default configuration. You can put other configs here if you hold strong formatting opinions.
🌐
DhiWise
dhiwise.com › post › react-code-formatting-made-easy-a-journey-with-prettier
React Code Formatting Made Easy: A Journey with Prettier
July 22, 2024 - Now, every time you save a file, the formatter will automatically format your code. ... To configure the React Formatter, you'll need to create a .prettierrc file in your project root. ... In your .prettierrc file, you can specify the formatting rules for your project. Here's an example:
🌐
Prettier
prettier.io
Prettier · Opinionated Code Formatter · Prettier
An opinionated code formatter · Supports many languages · Integrates with most editors · Has few options » · Your code is formatted on save · No need to discuss style in code review · Saves you time and energy · And more » · JavaScript · JSX · Flow ·
Find elsewhere
🌐
ExtendsClass
extendsclass.com › react-formatter.html
React formatter online
This tool allows to beautify react source code online. There is no file size limit, and your files are not sent to server side (they remain in your browser). ... Click on "Beautify" button in order to format your code. Click on "Download" or "Copy to clipboard" buttons to retrieve your formatted ...
🌐
Text Cleaner
textcleaner.net › home › react formatter
React Formatter and Beautifier to format react online
July 23, 2023 - Step 1: Paste your React code or upload a React file. Step 2: Click on the Format React button. Step 3: Now, the React formatter will format and display pretty and readable code in the output editor.
🌐
Javainuse
javainuse.com › react
Online React Code Formatter Tool
This code formatter can be used to quickly and easily format React code to ensure that it is written in the best possible way. It is an essential tool for making sure that your code is properly structured and styled.
🌐
Medium
rimazmohommed523.medium.com › react-102-configuring-code-formatting-using-prettier-eslint-husky-f207f1bcebed
React 102 : Configuring code formatting using Prettier, ESLint & Husky | by Rimaz Mohommed | Medium
July 14, 2023 - In this article I’ll be diving into setting up pettier, eslint and husky for configuting the code formatting rules for your react js…
🌐
CodeShack
codeshack.io › home › tools › react formatter
React Formatter - Online JSX Beautifier & Prettifier
Paste your React or JSX code into the "Input JSX" editor on the left. Use the "Formatting Options" to customize the output, like changing the indentation size or quote style.
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 360009896520-Format-React-Components
Format React Components – IDEs Support (IntelliJ Platform) | JetBrains
I am trying to figure a work around to the way the Code Formatter formats React components. For example this code from my App.js: render() { return (
🌐
Mdfaisal
mdfaisal.com › blog › how-to-add-linting-and-formatting-for-your-react-app
How to Add Linting and Formatting for your React App | Mohammad Faisal
January 19, 2021 - It is an opinionated code formatter. We can customize it to meet our needs. First, we need to install ESLint and Prettier. We will save these as dev dependencies because we don’t need them in production. If your application is scaffolded with create-react-app you don’t need to install eslint ...
🌐
Code Beautify
codebeautify.org › jsx-formatter
JSX Formatter and Beautifier Online
React is an open-source front-end web development library that uses JSX and redux as its core subject areas. It helps to beautify your JSX document. This tool allows loading the JSX document URL to beautify. Use your JSX URL to un-minify. Click on the URL button, Enter URL and Submit. JSX Formatter supports .jsx file upload file and format.
🌐
Codexize-Website
codexize.com › home › tools › react formatter
Free React Formatter Beautifier Viewer Validator Online
A React Formatter is a tool or software designed to automatically format and beautify React code, ensuring consistency and readability throughout a pr...
🌐
Unibeautify
unibeautify.com
Unibeautify · The Universal Code Beautifier
HTML CSS JavaScript TypeScript JSX (React) Vue C++ Go Objective-C Java Python PHP GraphQL Markdown And more... Personalize your code style and create a constant style across all maintainers with 40+ configuration options. Up-to-date documentation with hundreds of examples is automatically generated from beautifier, language, and option metadata.
🌐
Medium
manurana.medium.com › linting-formatting-in-react-and-react-native-92d7d19cc9eb
Linting & Formatting in React and React Native | by Manu Rana | Medium
June 1, 2022 - If you are here, let’s assume that you know how linting and formatting can help you write and maintain a cleaner JS/TS codebase. If not, read about it here, here and here. (just go through their intros for now) This opinionated post is specifically an attempt to simplify the process of configuring ESLint (linter) and Prettier (formatter) for newly created React or React Native apps, using the respective typescript templates.
🌐
Medium
medium.com › react-native-training › prettier-for-react-native-776fe33b8d93
Prettier, for React Native. Let the code format itself | by Lorenzo 'kelset' Sciandra | React Native Training | Medium
May 21, 2017 - By simply sharing the .eslintrc file with your team, you will automagically be assured that everyone will output the same formatting — which is just mind blowing! ... All together now! I really hope this few lines may have helped you out, if you face any issue feel free to take a peek at this repo of mine, on which I have Eslint+Flow+Prettier working side-by-side 🤓 As always, any feedback is appreciated, so feel free to comment down here or reach out on twitter — and, as always, ... Staff engineer at Shopify • React Native alum • mental health advocate • distinguished speaker