Comments (6)
I tried to get this working, but it's very difficult to see what's going on inside virtual-dom
, and I haven't been able to figure it out yet.
I'm trying to follow this, but the diff doesn't seem to be working. It doesn't seem to recognize that two widgets are of the same type, and keeps trying to initialize the new version rather than update it. Maybe the id
field is the key, but I'm not sure.
https://gist.github.com/Raynos/1bff2123314d1046fb07
If anyone who is familiar with virtual-dom
can help, I'd really appreciate it. @garyb any ideas?
I'll try to wrap this up tomorrow.
from purescript-halogen.
I think I saw it here https://github.com/Matt-Esch/virtual-dom/blob/master/vdom/update-widget.js
from purescript-halogen.
I think our widget
/widgetImp
needs to accept a name
parameter (or generate one internally) that is set when instantiating a Widget
, and then yes, they will be compared by id
rather than init
-function equality. So basically, for diffing, name+id
is used, otherwise init
.
The use of key
may also help, but I'm not sure how that fits in with widgets.
from purescript-halogen.
Definitely a priority for us given our dependency on ace, echarts, etc.
from purescript-halogen.
I've updated the widget
function:
- It now takes a
name
and anid
- It now returns a strongly-typed
Widget
- It now has access to the driver function in the
Renderer
.
from purescript-halogen.
👍
from purescript-halogen.
Related Issues (20)
- `tellAll` function is not re-exported in Halogen module
- Enabling `StateT` with `HalogenM` HOT 1
- Export tellAll from Halogen.Query to Halogen HOT 2
- Reading Effects chapter -> Could not match type ResponseFormat String with type AffjaxDriver HOT 4
- Question: how to handle events coming from a js app? HOT 2
- Communication with JS loaded via CDN HOT 2
- Child component gets rendered outside of parent, being moved to bottom of HTML body HOT 6
- `raise` should not be a blocking operation HOT 8
- Discussion: CSS strategy for halogen applications HOT 20
- Question: body-level events HOT 3
- Order of properties matters when using `value` with `min` / `max` for `InputRange` HOT 3
- Change kind of slots to not be `Type`
- `RenderSpec` doc comment still mentions `h` parameter
- Doc: the examples of "An Aff Example: HTTP Requests" give TypesDoNotUnify Error on Halogen v7 HOT 1
- Select Multiple Selected does not work HOT 4
- A bug? Weird behavior of text input fields. HOT 4
- Child component is destroyed while parent component handles output from that child HOT 5
- Array state updates HOT 4
- open and showModal are missing for dialog HOT 6
- The Component type should have role annotations
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 purescript-halogen.