Skip to content
Snippets Groups Projects
Commit f093872b authored by Andrej Rasevic's avatar Andrej Rasevic
Browse files

updates

parent 14082366
No related branches found
No related tags found
No related merge requests found
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>cmsc388a winter 2019</title>
<script src="https://unpkg.com/react@16/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script>
<style>
</style>
</head>
<body>
<div id="container"></div>
<script type="text/babel">
class HelloWorld extends React.Component {
render() {
return <p>Hello, {this.props.greetTarget} </p>
}
}
ReactDOM.render(
<HelloWorld greetTarget="Nikola"/>,
document.querySelector("#container")
);
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>cmsc388a winter 2019</title>
<script src="https://unpkg.com/react@16/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script>
<style>
</style>
</head>
<body>
<div id="container"></div>
<script type="text/babel">
class HelloWorld extends React.Component {
render() {
return <p>Hello, new world with components!!</p>
}
}
ReactDOM.render(
<HelloWorld/>,
document.querySelector("#container")
);
</script>
</body>
</html>
\ No newline at end of file
...@@ -7,4 +7,4 @@ ...@@ -7,4 +7,4 @@
1. Starting with the `main.html` starter file we have provided you with add the code to add a H1 element to the `h1-container`, a H2 element to the `h2-container` and a H3 element to the `h3-container` element. 1. Starting with the `main.html` starter file we have provided you with add the code to add a H1 element to the `h1-container`, a H2 element to the `h2-container` and a H3 element to the `h3-container` element.
2. Additionally, provide css rules inside of the `style tag` element so that the same padding and back-ground color appears in all 3 containers but that the text inside of each container is a different size and color. You should only have 4 css rules inside of the style tag. 2. Additionally, provide css rules inside of the `style tag` element so that the same padding and back-ground color appears in all 3 containers but that the text inside of each container is a different size and color. You should only have 4 css rules inside of the style tag.
Note: You can use either pure javascript or JSX syntax to create your elements. Reagrdless of which style you choose to implement your components you only need the single script tag inside of the body element we provided you with. Note: You cannot use either pure javascript or JSX syntax to create your elements. Please use just the JSX syntax we discussed in class.
\ No newline at end of file \ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment