Home > database >  Div id is not defined in a function using react.js
Div id is not defined in a function using react.js

Time:11-01

import React from "react";
import "./profile.css";

const Notifications = () => {
  function changeText() {
    themebox.textContent =
      "Nice";
  }
  function changeText2() {
    themebox.textContent =
      "Fair";
  }

  function changeText3() {
    themebox.textContent = "Aggressive";
  }

  function changeText4() {
    themebox.textContent =
      "Threatening";
  }

  return (
    <div className="notification-container">
      <h3>Notifications</h3>

      <div className="notif-picker">
        <p className="Selected" onClick={changeText}>
          Nice           
  • Related