Comments (3)
Ok, there's a workaround for now. The main idea was not to cause rerendering if callbacks change.
The null error can easily be avoided. But if we want someFunctionAttribute == null
to work, that's a different story. We could make it so that one can write hasSomeFunctionAttribute
instead. Or we burry this optimization
from coconut.ui.
Hmm, I think I like the optimization that's currently disabled and I'm thinking to reenable it in a few cases.
For starters, if the function is optional and has a non-null default, because then we know it'll never be null
so the wrapping is safe.
Beyond that, I would also propose that when the attribute is mandatory and not Null
it's meaningful to assume that null
is invalid, especially since passing null
as attribute in HXX probably doesn't work anyway due to type inference. So for mandatory non-Null
function attributes, I'm inclined to enable this. We could make an explicit null check and throw an error that states more explicitly what's wrong, e.g. invalid null passed to onPress attribute of <Main />
or something.
from coconut.ui.
We can have a try
from coconut.ui.
Related Issues (20)
- Pull down coconut.ui.Isolated into backends
- Make Slots more lightweight.
- Facilitate initialization.
- Document transformation with @:controlled attributes
- @:loaded doesn't compile HOT 1
- Run some code before first call to render() HOT 1
- @:computed static var does not compile in View
- Top down inference not applied to @:computed.
- Backend for nodegui HOT 1
- hxx shorthand (string literal as function body) is not working for @:attr function
- 1.0 HOT 1
- Make build passes via priority queue.
- Type not found : tink.state.internal.ObservableObject HOT 1
- type is not observable, because type is not observable because the field "_db" is mutable HOT 1
- Bug with Scheduler? "Uncaught (in promise) ReferenceError: process is not defined" HOT 2
- @:loaded not working with hxnodejs HOT 7
- Won't build: Slot.hx Too many arguments
- @:controlled stoped working in Haxe 4.3
- Safe navigation operator not supported
- Add a compiler define for forcing boolean attributes to be required
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 coconut.ui.