How to pass the useState setter as a function parameter?

后端 未结 0 591
[愿得一人]
[愿得一人] 2021-01-19 05:51

I have a code which flips between a dark theme and light theme on button click as follows:

App.js:

import React, { useState } from "react";
i         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题