In process of learning React.js with this link at 35:50 min
getting problem with col tags. No surprise its is working for youtuber.
import React from "react";
import millify from "millify";
import { Typography, Row, col, Statistic } from "antd";
import { Link } from "react-router-dom";
const { Title } = Typography;
const HomePage = () => {
return (
<>
<Title level={2} className="heading"> Global Crypto Stats </Title>
<Row>
<col span={12}> <Statistic title="Total cryptocurrencies" value="5" /> </col>
<col span={12}> <Statistic title="Total Exchanges" value="5" /> </col>
<col span={12}> <Statistic title="Total Market cap" value="5" /> </col>
<col span={12}> <Statistic title="Total 24h volume" value="5" /> </col>
<col span={12}> <Statistic title="Total Markets" value="5" /> </col>
</Row>
</>
);
};
export default HomePage;
No beginners luck sigh :(
You have the case of col wrong.
In lower case, col represents the HTML <col> element, which can only be an empty element. However, Col with an upper-case C appears to be a component from the antd library. See for example its use here. Also, if you pay close attention to the video, it indeed uses <Col ...> rather than <col ...>.
Change col to Col in your import statement and in the various <col ...> ... </col> lines.