I am trying to create a small program where I have to display date and time using react JS. It is displaying everything as expected except date and time value in the HTML page.
enter code here
import React from "react";
import ReactDOM from "react-dom";
const name = "Flash";
const currDate = new Date().toLocaleDateString;
const currTime = new Date().toLocaleTimeString;
ReactDOM.render(
<>
<h1>My name is {name}</h1>
<p> Current Date is = {currDate} </p>
<p> Curremt Time is = {currTime} </p>
</>,
document.getElementById("root"));