-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
chore: add TodoMVC
as example
#103
base: master
Are you sure you want to change the base?
Conversation
0b0a6e0
to
4bb86ca
Compare
import { source, TodoContext } from '../controller' | ||
import { useObservable } from '../hooks' | ||
|
||
export const Filter = React.memo(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will there have any problem using React.memp
with empty props
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this should be ok, just like
shouldComponentUpdate() {
return false
}
can't tell differences between both, imo, the context only injects code inside component, which make it as a more coupled component. besides, no differences to me. |
@Saviio really hard to cr, could you post key changes as a snippet image? |
这里还有一个分支:
https://github.com/ReactiveDB/core/tree/chore/example-v2
我已经分不清哪个 branch 更值得推荐了...
我的主要问题在于,怎么写 dispatcher,视图组件的划分逻辑,要不要用 context
P.S.
PR 的这个版本是使用了 context 的,建议 clone 下来 review