Comments (4)
Your solution looks definitely easy to use but not very easy to read and may be hard to debug (is it? I wouldn't know how to improve it actually...). Other possible solutions could be:
- importing and using a utility function as we do for
valueLink
(it may be more readable, but it would work the same way I think)
onClick={revengeBind(myFn, myArg1, myArg2)}
- passing prop with a special suffix and then removing it to let components use props as usual (black magic?)
bindOnClick={[myFn, arg1, arg2]}
from revenge.
onClick={revengeBind(myFn, myArg1, myArg2)}
👍 for something like this. Costs: adds an import on "user" component. Pros: makes it explicit we intend to pass a PureFunction
prop
passing prop with a special suffix and then removing it to let components use props as usual
Seems too much, especially considering the above "tagging" mechanism we should be safe enough
from revenge.
Added pureFunctionProp
, see here for examples: https://github.com/buildo/labonline/commit/9a2257002b4ce4ca0966ba2245d959961d47113a
from revenge.
naming is misleading probably, but at least it is clear that it builds on top of a pure render implementation. Merge as it is for now
from revenge.
Related Issues (20)
- update avenger dep
- properly reject av Promise on error HOT 1
- update deps
- better handling of nextPath in anonymous
- remove Query.js
- update avenger version
- make batch debounce delay configurable
- collect errors from avenger execution
- fix readyState loading
- queries.filter should be per-query
- getState should be app business only
- update avenger dep
- add @mapProps decorator
- Update lodash to ^4
- split into separate small repos and deprecate this HOT 6
- [pure] safer handling of `state = null/undefined`
- functional getLocals with default
- @pure should be customizable for specific components
- @skinnable should cache locals
- make `@pure` usable also as a function
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from revenge.