Course Content
Run Your First Project
This course is designed to help you kickstart your journey in project management. Whether you're a beginner or looking to brush up on your skills, this course will provide you with the essential knowledge and tools needed to successfully manage your first project from start to finish. Join us in "Run Your First Project" and gain the confidence and skills to manage your next project with success!
0/2
Rendering Elements
In React, elements are the smallest building blocks of React applications. React elements are immutable and describe what you want to see on the screen. They are used to construct the user interface by defining how it should look at a given point in time. When rendering, React elements are passed to the React DOM, which efficiently updates and renders the elements to the actual DOM.
0/12
Build Your Application
0/1
Learning Journey Of React
About Lesson

Your React JSX code can be placed in a separate file.

Let’s render a special button instead of the default react logo like https://www.weiy.cc/online-courses/learning-journey-of-react/lesson/run-your-project-and-see-the-effect/ in our web page.

We design the style for the button in a separate file Button.js

var myStyle = {
  fontSize: 100,
  color: '#FF0000'
};
export default function Button() {
  return <button style={myStyle}>weiy.cc</button>;
}

Then import it in App.js and use it.

import Button from "./Button"

export default function App() {
  return <Button/>
}

Here is a new result for the original project.

.

You can try it in the our sandbox.