Wednesday, January 17, 2018
React Virtual DOM explained...
React maintains a Virtual DOM Object, to which we can write state changes and render instructions.
Whenever there is a need to render a change in View based on a state change, the Virtual DOM first updates itself and then compares its state (visual state) to that of the actual DOM and efficiently changes the actual DOM at those places where the change is required. This is achieved with one way data binding approach in React.
In Angular and Ember we have two way data binding, which blindly redraws the entire actual DOM whenever there is a change in state.
This makes React better in performance compared to other frameworks.
Visual Studio copy paste issue
Whenever you copy Javascript code, from an external website/word processor in to Visual Studio Code, it will paste fine, and format fine. But when you run any code that imports this copied code module into your current module, you will get “module not found” or “<object>.<function> is not a function” errors in your console.
When you copy the code you want to copy onto notepad, and then copy the notepad contents into your Visual Studio editor file, then this error will go away.
When you copy the code you want to copy onto notepad, and then copy the notepad contents into your Visual Studio editor file, then this error will go away.
Subscribe to:
Posts (Atom)