I've used the Prettier extension in the visual studio code editor for a long time, but recently I am writing to React with Typescript. So I need to configure for Prettier to format .tsx files.
edit setting with following in settings.json of VScode
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},