React: set state from another component by calling a function

前端 未结 0 1576
栀梦
栀梦 2021-01-21 02:53

I want to render an alert message by calling a function, basically how vanilla javascript alert() function works.

This is my code:

import React, { useState         


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