my goal is to use Material-UI without using create-react-app as the latter abstracts too much away for me to learn these things. All instruction I found are unfortunately entirely based on create-react-app.
I want to generate the most minimalistic setup to achieve this, mostly for learning purpose. To start with, I want to display just a simple Material-UI Button.
For this I used the most minimalistic React-"Hello World" example from reactjs.org and added the Material-UI UMD in the following way:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Hello World</title>
<script src="https://unpkg.com/react@17/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/@material-ui/core@latest/umd/material-ui.development.js"></script>
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
</head>
<body>
<div id="root"></div>
<script type="text/babel">
ReactDOM.render(
<Button variant="contained" color="primary">
Hello World
</Button>,
document.getElementById('root')
);
</script>
</body>
</html>
I'm having trouble importing the Button from material-ui.development.js and then rendering this Button.
I've tried different import and require() expressions at different places in the code but it's more a try and error instead of a real understanding of what is necessary.
I hope someone can help me out here.