react.js
This is a formatted version of Komadori's answer
(https://tinyurl.com/Komadori)
React is a JavaScript library for building user interfaces.
It is maintained by Facebook and a community of
individual developers and companies.
React can be used as a base in the development of single-page
or mobile applications.
4.67
2
// How to create a React app
npx create-react-app [(.) OR (new Folder)] = (npx create-react-app .) OR (npx create-react-app my-app)
Thank you!
2
2
4
1
npx create-react-app my-app
Thank you!
1
0
4
2
class ShoppingList extends React.Component {
render() {
return (
<div className="shopping-list">
<h1>Shopping List for {this.props.name}</h1>
<ul>
<li>Instagram</li>
<li>WhatsApp</li>
<li>Oculus</li>
</ul>
</div>
);
}
}
// Example usage: <ShoppingList name="Mark" />
Thank you!
2
0
0
0
// import { Link } from "react-router-dom";
import { IBlog as IProp } from "./useFetch"
const BlogList: React.FC<IProp> = ({ data }: IProp) => {
const renderList = () => {
return data.map((blogIndex) => {
return (
<div className='blog-preview' key={blogIndex.id}>
<a href={`/blogs/${blogIndex.id}`}>
<h2>{blogIndex.title}</h2>
<p>Written by {blogIndex.author}</p>
</a>
</div>
)
})
}
return (
<ul>
{renderList()}
</ul>
)
}
export default BlogList;
Thank you!
0
0
0
0
A JavaScript library for building user interfaces
Thank you!
0
0
Are there any code examples left?
New code examples in category Other