forked from reactplay/react-play
-
Notifications
You must be signed in to change notification settings - Fork 0
/
WhyReact.jsx
42 lines (38 loc) · 1.11 KB
/
WhyReact.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import PlayHeader from "common/playlists/PlayHeader";
import { useState } from "react";
import { getPlayById } from "meta/play-meta-util";
import "./why-react.css";
const WhyReact = ({ id }) => {
// The following code is to fetch the current play from the URL
const play = getPlayById(id);
const [reasons] = useState([
"React is Declarative",
"It is fast",
"JSX is simple",
"It is Component-based",
"It is easy to learn",
"It is fun to use",
"Write Once, Use Everywhere",
]);
return (
<>
<div className="play-details">
<PlayHeader play={play} />
<div className="play-details-body">
<p>
React is a JavaScript library for building user interfaces. It is
maintained by <b>Facebook</b> and a community of individual
developers and companies.
</p>
<ul>
<h2 className="heading">Why React?</h2>
{reasons.map((reason, index) => {
return <li key={index}>{reason}</li>;
})}
</ul>
</div>
</div>
</>
);
};
export default WhyReact;