dapoadedire / astro-pic-of-the-day

Avoid .bind() or local functions in JSX properties JS-0417
Performance
Major
2 occurrences in this check
JSX props should not use arrow functions
44      <button type="submit">Search</button>
45    </form>
46    <div className="button">
47          <button onClick={48            () => {49              const randomDate = generateRandomDate();50              setDate(randomDate);51            }52          }>53            Random
54          </button>
55    </div>
JSX props should not use arrow functions
29
30      
31    <form 
32    onSubmit={(e) => {33      e.preventDefault();34      const date = e.target.date.value;35      setDate(date);36    }}37    >
38      <label htmlFor="date">
39          <input type="date" name="date" id="date" max={todaysDate}