Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2048 #1

Open
devrsi0n opened this issue Sep 21, 2017 · 30 comments
Open

2048 #1

devrsi0n opened this issue Sep 21, 2017 · 30 comments

Comments

@devrsi0n
Copy link
Owner

https://devrsi0n.github.io/React-2048-game/

@devrsi0n
Copy link
Owner Author

devrsi0n commented Sep 21, 2017

test

@xinglee23
Copy link

继续深挖,加油。文档可以写的更详细一点

@e3gs
Copy link

e3gs commented Sep 21, 2017

回退后分数没回退。。

@devrsi0n
Copy link
Owner Author

devrsi0n commented Sep 21, 2017

@eennoo 已修复。

@CristL
Copy link

CristL commented Oct 9, 2017

COOL~

@leeggco
Copy link

leeggco commented Oct 11, 2017

666

@danielfengyu
Copy link

666 666

@shenzekun
Copy link

移动的时候不太顺畅希望改进一下

@devrsi0n
Copy link
Owner Author

@shenzekun 是桌面端还是移动端呢?

@shenzekun
Copy link

桌面端 @devrsi0n

@ysc123
Copy link

ysc123 commented Oct 12, 2017

我感觉,代码应该写点注释的!

@LeesinChen
Copy link

...

@devrsi0n
Copy link
Owner Author

@ysc123 ok,我再完善下。

@douhaoi
Copy link

douhaoi commented Oct 12, 2017

19632

@devrsi0n
Copy link
Owner Author

@douhaoi 这是你的分数?我最高分 56100。
screenshot

@LeeRayno
Copy link

你好,我想问下关于eslint怎么配置,create-react-app 他自带eslint吗? 比如该2个空格的,我敲4个空格,他没有报错,方法()之间该有空格的,我没有空格他也不报错。我怎么找都没有找到create-react-app 里面的eslint的配置。我看你这里有关于stylelint的配置。目录还有.eslintignore这个文件,但是也没有.eslintric这个文件啊。------- 就是想问下在create-react-app 怎么配置eslint -------

@devrsi0n
Copy link
Owner Author

devrsi0n commented Oct 13, 2017

@LeeRayno create-react-app 是有 eslint,只不过他用的是自己的规则,而且校验不怎么严格。如果你要配置自己的 eslint 配置需要 reject 后自己添加 eslint 的配置,建议用 airbnb 那套规则。这个项目之所以没有 .eslintrc 是 eslint 的配置都在 package.json 这里,像 babel,jest,stylelint 这些配置都在 package.json 里面。

@LeeRayno
Copy link

@devrsi0n 好的,谢谢。我之前reject了的。也配置了eslint依旧无效。下次按照你package.json里面的配置试试。

@stanNo1
Copy link

stanNo1 commented Oct 13, 2017

good job

@liuxiaole
Copy link

欢迎交流。我实现的一个动画版 https://liuxiaole.github.io/2048-react-redux/

@Natumsol
Copy link

快速移动的时候会卡顿,方块合并的算法感觉需要优化。附上我之前实现的一个:https://github.com/Natumsol/2048-react-redux

@devrsi0n
Copy link
Owner Author

@Natumsol 这个是故意加了一定 debounce 去抖的缘故。

@devrsi0n
Copy link
Owner Author

@liuxiaole 不错,有动画给人的感觉很丝滑。👏

@YutHelloWorld
Copy link
Contributor

如果引入Route, 你的项目结构如何排布?

@devrsi0n
Copy link
Owner Author

@YutHelloWorld React 的 Route 还不是很熟悉,但是感觉和 Vue 的 Route 有些类似,如果要引入 Route 的话,这篇文章这种结构还不错,再加个导航栏组件,组件里面再添加 Route,应该就差不多了。

@YutHelloWorld
Copy link
Contributor

@devrsi0n react-router4和vue的router差别还是很大的,我之前做了个包含react-router4和redux、react的脚手架,感觉结构划分不是太好,可以交流交流

@devrsi0n
Copy link
Owner Author

devrsi0n commented Oct 14, 2017

@YutHelloWorld 很有参考价值,已 star,结构划分的话我想到的是多参考 github 一些优秀的 boilerplate 项目。话说如果把 router 之类的全家桶加进来,我这个项目也可以把骨架提出来做一个 boilerplate 2333😄

@YutHelloWorld
Copy link
Contributor

YutHelloWorld commented Oct 14, 2017

@devrsi0n 带有route的组件和常见的smart dumb结构还是有区别的,举个🌰:<Route component={MyComponent} />,在这里MyComponent 可以是smart, 也可以是dumb, 还可以是HoC, 甚至是多个地方复用的smart,那么这个MyComponent 到底应该放在哪里呢?这个可以好好思考思考, 期待你的建议。

@ghost
Copy link

ghost commented Dec 6, 2017

  • test

@venkatsingireddi
Copy link

test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests