Calling a function in the placeholder of an input

If you want to call a function in the placeholder of an input:

<input placeholder = {functionName()}/>

As an example, I've created a component in React displaying an input with a placeholder depending on the day of the week:

import React, { useState } from 'react';

const DayOfTheWeek = () => {
    const [name, setName] = useState('');
    const dayOfTheWeek = () => {
        let today     = new Date();
        let dayOfWeek = today.getDay();
        let weekDays  = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
        return `Type: ${weekDays[dayOfWeek]}`;
            onChange    = {(e) => setName(} 
            value       = {name} 
            placeholder = {dayOfTheWeek()}

export default DayOfTheWeek;

Hi, I'm Erik, an engineer from Barcelona. If you like the post or have any comments, say hi.