React
by Gereltod Gotsbayar
HTML
<div id="app"></div>
SCSS
:root {display: block}
.items {
display: grid;
grid-template-columns: 1fr 2fr;
h2:nth-child(odd) {
color: green;
}
}
React
class TodoApp extends React.Component {
constructor(props) {
super(props)
this.state = {
items: [
{
"CustomerID": 19654,
"CustomerName": "z",
"CustomerTypeID": 408,
"CustomerTypeName": "Авто угаалга"
},
{
"CustomerID": 19658,
"CustomerName": "s",
"CustomerTypeID": 408,
"CustomerTypeName": "Авто угаалга"
},
{
"CustomerID": 19631,
"CustomerName": "x",
"CustomerTypeID": 409,
"CustomerTypeName": "Авто засвар"
},
{
"CustomerID": 19654,
"CustomerName": "z",
"CustomerTypeID": 409,
"CustomerTypeName": "Авто засвар"
},
{
"CustomerID": 19657,
"CustomerName": "sad",
"CustomerTypeID": 409,
"CustomerTypeName": "Авто засвар"
},
{
"CustomerID": 19659,
"CustomerName": "wer",
"CustomerTypeID": 409,
"CustomerTypeName": "Авто засвар"
},
{
"CustomerID": 19660,
"CustomerName": "s",
"CustomerTypeID": 409,
"CustomerTypeName": "Авто засвар"
},
{
"CustomerID": 19662,
"CustomerName": "asd",
"CustomerTypeID": 409,
"CustomerTypeName": "Авто засвар"
},
{
"CustomerID": 19654,
"CustomerName": "z",
"CustomerTypeID": 410,
"CustomerTypeName": "Авто сэлбэг"
},
{
"CustomerID": 19659,
"CustomerName": "wer",
"CustomerTypeID": 410,
"CustomerTypeName": "Авто сэлбэг"
},
{
"CustomerID": 19660,
"CustomerName": "s",
"CustomerTypeID": 410,
"CustomerTypeName": "Авто сэлбэг"
},
{
"CustomerID": 19662,
"CustomerName": "asd",
"CustomerTypeID": 410,
"CustomerTypeName": "Авто сэлбэг"
},
{
"CustomerID": 19656,
...