Open devrsi0n opened 6 years ago
test
继续深挖,加油。文档可以写的更详细一点
回退后分数没回退。。
@eennoo 已修复。
COOL~
666
666 666
移动的时候不太顺畅希望改进一下
@shenzekun 是桌面端还是移动端呢?
桌面端 @devrsi0n
我感觉,代码应该写点注释的!
...
@ysc123 ok,我再完善下。
19632
@douhaoi 这是你的分数?我最高分 56100。
你好,我想问下关于eslint怎么配置,create-react-app 他自带eslint吗? 比如该2个空格的,我敲4个空格,他没有报错,方法()之间该有空格的,我没有空格他也不报错。我怎么找都没有找到create-react-app 里面的eslint的配置。我看你这里有关于stylelint的配置。目录还有.eslintignore这个文件,但是也没有.eslintric这个文件啊。------- 就是想问下在create-react-app 怎么配置eslint -------
@devrsi0n 好的,谢谢。我之前reject了的。也配置了eslint依旧无效。下次按照你package.json里面的配置试试。
good job
欢迎交流。我实现的一个动画版 https://liuxiaole.github.io/2048-react-redux/
快速移动的时候会卡顿,方块合并的算法感觉需要优化。附上我之前实现的一个:https://github.com/Natumsol/2048-react-redux
@Natumsol 这个是故意加了一定 debounce 去抖的缘故。
@liuxiaole 不错,有动画给人的感觉很丝滑。👏
如果引入Route, 你的项目结构如何排布?
@YutHelloWorld React 的 Route 还不是很熟悉,但是感觉和 Vue 的 Route 有些类似,如果要引入 Route 的话,这篇文章这种结构还不错,再加个导航栏组件,组件里面再添加 Route,应该就差不多了。
@devrsi0n react-router4和vue的router差别还是很大的,我之前做了个包含react-router4和redux、react的脚手架,感觉结构划分不是太好,可以交流交流
@YutHelloWorld 很有参考价值,已 star,结构划分的话我想到的是多参考 github 一些优秀的 boilerplate 项目。话说如果把 router 之类的全家桶加进来,我这个项目也可以把骨架提出来做一个 boilerplate 2333😄
@devrsi0n 带有route的组件和常见的smart dumb结构还是有区别的,举个🌰:<Route component={MyComponent} />
,在这里MyComponent 可以是smart, 也可以是dumb, 还可以是HoC, 甚至是多个地方复用的smart,那么这个MyComponent 到底应该放在哪里呢?这个可以好好思考思考, 期待你的建议。
test
https://devrsi0n.github.io/React-2048-game/