3

[新人向] react 练手项目,计算器

 3 years ago
source link: https://www.v2ex.com/t/795776
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  React

[新人向] react 练手项目,计算器

  zuobinwang · 20 小时 5 分钟前 · 885 次点击

之前刚学习的时候写了一个计算器,看官网的计算器支持只到了 16.8,也全都是拿类组件写的

自己最近又看了看自己之前写的代码,发现很多地方都写的好蠢,重构了一版 hooks+一些目录安排

觉得可以让想入门的伙伴们康康

https://github.com/Dreamerryao/React-Calculator

10 条回复    2021-08-15 10:53:46 +08:00

learningman

learningman   19 小时 59 分钟前 via Android

把 build 也传上来了我是没想到的

rabbbit

rabbbit   19 小时 45 分钟前

0.1 + 0.2 = ?
9007199254740991 + 2 = ?
建议用 math.js 之类的计算

xiangyuecn

xiangyuecn   19 小时 13 分钟前

@learningman 开个 pages 直接访问 能少敲一个命令都是体验🐶

zuobinwang

zuobinwang   18 小时 10 分钟前

@learningman 哈哈哈 更新了 ignore

zuobinwang

zuobinwang   17 小时 10 分钟前

感谢各位 dl 的回复,添加了 mathjs,同时添加了键盘事件,欢迎反馈!

xstress

xstress   15 小时 41 分钟前

向大佬学习下哈哈哈

christin

christin   5 小时 35 分钟前 via iPhone

我以为你是写着玩 没想到真的引入了 jq……

zuobinwang

zuobinwang   43 分钟前 via iPhone

@christin 我也想了解一下其他的方法 mmm 如果有在 public 传入配置文件的需求其实还真不太好弄

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK