Comments (8)
I think I know how I can lose the closure now. Thank you so much for bringing this up!
from floem.
It's done in main now. I've also added text()
. The couter example looks much better!
from floem.
Thanks for your interest.
I'm not familiar with FromFn
. Any simple example to show how it works?
from floem.
Something like https://doc.rust-lang.org/std/iter/fn.from_fn.html
Basically it would just exist to handle cases where you do want your view inside a closure. Then we could write v_stack(text("Hello world!"))
and v_stack(view::from_fn(|| text("Hello world!")))
from floem.
Got it thanks for clarifying.
The view has to be always inside a closure though because the child's id needs to be created based on the parent's id.
from floem.
Oh interesting sorry I didn't know. In that case couldn't views get their context from the View
trait? If they're already being returned I feel like IDs can be created in one of those methods, similar to xilem.
from floem.
Awesome! Looking forward to checking it out
from floem.
For sure I think it looks great! Can't wait to try it out 👍
from floem.
Related Issues (20)
- Tooltips not hiding automatically on some cases
- Left sidebar layout example is missing the last element HOT 1
- VirtualList: multiple items are selected at the same time when inserting new elements
- Counter example doesn't compile HOT 1
- KeyUp event not triggered HOT 2
- App crashes when quitting while a tooltip is still visible HOT 2
- Signal on_cleanup not triggered HOT 1
- Conditional renderer compilation
- Unresolved imports in Counter example HOT 2
- Commit *Revert back to use CENTRAL_UPDATE_MESSAGES* breaks popups HOT 4
- Documentation for many methods of `View` refer to a non-existent method HOT 1
- Inter-window messages sent to a view via `ViewId.update_state()` are broken HOT 11
- Chaos when a new window is opened during a drag operation HOT 2
- Why does a white background appear when Lapce or Floem Application is launched, and how can it be eliminated? HOT 6
- Can we accelerate the development ? HOT 2
- No way to resign `active` HOT 4
- can not create fullscreen window with title bar
- `movable_by_window_background` breaks slider and text selections on macos
- Text selection panic on multi-line labels HOT 3
- Textedit with rich language support HOT 2
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 floem.