Questions tagged [virtual-dom]

Use virtual-dom for questions related to an object model which mimics the structure of and intercepts events normally handled by the real document object model (DOM).

The virtual-dom applies of the technique of double buffering to the DOM. It is used for many purposes, including:

  • security: sandboxing DOM mutation
  • performance: minimization of repaints and reflows
  • testing: performing static analysis on the rendered tree

References

215 questions
0
votes
1 answer

How React Virtual DOM works when I set both the changed states and the unchanged states?

How React Virtual DOM diff between the old in-memory DOMs and the new in-memory DOMs? Specifically, is there any difference between that I just set the changed states and that I set both the changed states and the unchanged states? Is there any…
user3300252
  • 109
  • 6
0
votes
0 answers

React setState() call doesn't update UI

I am learning React and am doing the learnyoureact module from NodeSchool. My understanding of React thus far is that you render React Components as virtual DOM and let React handle the UI changes (read from an SO post). I'm assuming this is…
Sticky
  • 3,671
  • 5
  • 34
  • 58
0
votes
2 answers

ClipboardJS with React, using document.getElementById()

Originally, I had it working fine. Then I did this and now I can't get it to work ClipboardField.js import React from 'react'; export default (props) => { return(
user2465134
  • 8,793
  • 5
  • 32
  • 46
0
votes
2 answers

react nested component pass builtin function (no flux)

I'm trying to pass built in react function through props and trying to set state but I get this as undefined! I've tried something like this: index.js let somefun = function(){ this.setState({myvar:1}); } ReactDom.render(
Nishanth Matha
  • 5,993
  • 2
  • 19
  • 28
0
votes
1 answer

Tracking a ReactJS application

I have been working with AngularJS and its structure is in a way that, as the user browses around the website, only views and routes change and there are no pageviews and etc triggered (GTM is not loaded per route). Hence, I have faced quite a…
Sina
  • 765
  • 1
  • 13
  • 32
0
votes
1 answer

CycleJs - Subscribing events of the same element which has different classes

I created an element with class foo. Then I intended to swap its class with bar after an click event was occurred. However, when I clicked the element, streams that subscribes the click events of the foo and bar were triggered successively. As a…
erdal
  • 421
  • 3
  • 10
0
votes
0 answers

How to persist dynamic views?

I am using .NET MVC 4. Let's say I have a Pinterest-style social media site. Users can pin content (ie., images), and decide the layout of their pinboard by dragging/dropping images around the board. How do I persist the layout they've made so that…
A.H. Sarkar
  • 19
  • 1
  • 3
0
votes
1 answer

How do I define svg attributes in virtual-dom?

Is there a way to add svg attributes to nodes using virtual-hyperscript in virtual dom? For example, something like this: var h = require('virtual-dom/h') h('svg', [ h('circle', {cx: 100, cy: 100}, 'some text') ]) I've tried to do this myself,…
aqui8
  • 511
  • 3
  • 11
0
votes
1 answer

Capturing React Diffs and patching them manually

Does React/react-dom have the ability to let users manually compare two doms, get the diff, and apply the diff to the dom manually? As it happens now, it seems like the process of diffing and patching is done internally but I am hoping to do it…
goofiw
  • 607
  • 5
  • 16
0
votes
1 answer

Am I understanding the Virtual Dom correctly?

I'm working on a basic introduction to React program and was wondering if I am understanding the diffing of the virtual dom correctly. I have this small app: import React, { Component } from 'react'; const svgStyle = { border: '1px solid…
adam-beck
  • 5,659
  • 5
  • 20
  • 34
0
votes
1 answer

Rx timer state not updating in view in Cycle.js

I'm starting a timer when someone clicks a button that I intend to use as the opacity for some element. When I use do to trace the value I can see it spitting out to the console 40 times, but in the view the number stays put. Not sure where I'm…
azium
  • 20,056
  • 7
  • 57
  • 79
0
votes
1 answer

Are Web Components (Polymer) and/or Shadow DOM compatible with a Virtual DOM?

I am trying to wrap my head around whether a Web Component can take advantage of the speed improvements provided by a Virtual DOM. I am guessing the Shadow DOM might be a stumbling point. I understand the concept of concept of the virtual DOM more…
0
votes
1 answer

virtual-dom - how to get hold of real DOM element in order to integrate with spin.js?

When using the virtual-dom library, how can I get hold of the real DOM element corresponding to a virtual one? The use case is I need to manipulate the DOM via the spin.js library. Correspondingly, in React you would call React.findDOMNode in order…
aknuds1
  • 65,625
  • 67
  • 195
  • 317
-1
votes
1 answer

What is the purpose of reactDOM in reactjs

Explanation: why reactjs use virtual Dom concept, how does it different from orginal Dom. Explain with suitable example . Also explain how react Dom render jsx components How react virtual Dom works explain in a simple words .
-1
votes
2 answers

Snapshot of HTML in Vue3 Proxy object or vitual DOM

Printing javascript "Proxy" object wrapping my virtual Vue3 app perfectly displays a specific value I would like to extract. console.log(proxyVueApp) ...outputs beautiful HTML deep down in proxyVueApp.$.vnode.el.outerHTML. Accessing the prop…
Kasper Skov
  • 1,954
  • 10
  • 32
  • 53
1 2 3
14
15