DEV Community

My Learning React Notes

Dillon on February 14, 2023

.js in React files have the following format IMPORTS This is where you put stuff you are importing. import React from 'react'; import {createR...
Collapse
 
dillpap profile image
Dillon

Components are usually defined as JS functions and will return one or more React elements.

React elements describe what we want to create.

React.createElement('html thing like h1 or p or div', , what goes in the html)
React.createElement(FunctionName, null)

**You have got to capitalize the function name, this is what lets react know you want it to be processed as a component