How can custom Hooks in React have different state names then the state name used by the functional component from which it was called?

前端 未结 0 620
悲&欢浪女
悲&欢浪女 2020-12-28 18:36

Firstly, Here is the working code:

#App.js

import React, { useState } from "react";

const useCounter = ({ initialState }) => {
  const [c         


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