Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 
avatar of enbermudas

enbermudas

enbermudas has asked 4 questions and find answers to 2 problems.

Stats

132
EtPoint
47
Vote count
4
questions
2
answers

About

import React, { useState } from 'react';

const Profile = () => {
  const [info, setInfo] = useState({
    name: 'Enrique Bermúdez',
    birthday: 824612400000,
  });

  const unixToDate = (unix) => new Date(unix).toLocaleDateString("en-US");

  return (
    <div className="profile">
      {`My name is ${info.name}! and I was born on ${unixToDate(info.birthday)}`}
    </div>
  );
};

export default Profile;