工业聚
工业聚
> Does farrow support websocket now? Not yet
I have no idea how to update state.foo from the child component to the parent component, since the child component just receives a string. ```javascript function Input({ value }) {...
> How about using a special proxy key to wrap the atomic value? > > ```js > function Input({ value }) { > const onChange = useMutate(e => { >...
Let's think about it. PR is welcome!!
I am working in the process for `binding` features now~
@littlehaker I want to know your feeling about the `binding` API below, it's ok to you or not? ```javascript function Input({ value }) { const onChange = useMutate(e => {...
@littlehaker It's good, it looks even better if we use hooks ```javascript const foo = useBinding({ get: () => state.foo, set: (value) => state.foo = value }) ```
I think the API names should be changed when the features become more general ```javascript const foo = useComputed({ get: () => state.foo, set: value => state.foo = value })...
@littlehaker Sorry for changing API frequently. But I found we maybe go too far away from our original purpose. `useComputed` accepts get/set function in function-component, it is too powerful to...
@littlehaker I have tried some implementation, and I figured out that none of them is better than `useMemo` with `getter/setter`. ```javascript const celsius = useMemo(() => { return { get...