First create a react app using create-react-app with Typescript support
npx create-react-app --template typescript
yarn add @material-ui/core @types/@material-ui axios @babel/preset-env @babel/preset-react @babel/plugin-syntax-jsx
Create a babel configuration file in the root - Name it as - babel.config.js and add the following lines -
'use strict'
/**
babel.config.js with useful plugins.
*/
module.exports = function(api) {
api.cache(true);
api.assertVersion("^7.4.5");
const presets = [
["@babel/preset-env"],
["@babel/preset-react"]
];
const plugins = [
['@babel/plugin-syntax-jsx']
];
return {
presets,
plugins
}
}