reactjs - 如何使反应登录按钮呈现登录组件
问题描述
//This code renders a homepage with login button and signup button.
//我希望登录按钮在单击时呈现登录组件。相同的注册按钮 import React from "react" import "./firstpage.css"
function Firstview(){
return <div>
<h1>JC</h1>
<div className="d-flex justify-content-center">
<button type="button" className="btn btn-primary btn-lg" >Login</button></div>
<div className="d-flex justify-content-center">
<button type="button" className="btn btn-primary btn-lg">Signup</button>
</div>
</div>
}
export default Firstview;
解决方案
推荐阅读
- django - Embed plotly:dash figure inside django template
- javascript - iPhone / iPad - 终止应用程序时未保存 Safari 浏览器 cookie
- node.js - 为什么我的快速路由器中间件没有定义 req.route?
- vue.js - 事件高度,如使用 vue-cal 的谷歌日历
- wpf - StackPanel 水平内容对齐在 dataTemplate 中居中
- php - 如何使用php只显示全名
- java - 来自组合字符串的正则表达式数字和点(点)
- java - Selenium DataProvider - 如何在 HashMap 中添加 Excel 工作表中的所有值
- nestjs - 有没有办法从 nest.js 中进行 jayson npm JSON-RPC 调用?
- r - 创建从 0 到表变量中的值的新列