This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| prepareUpdate( | |
| domElement, | |
| type, | |
| oldProps, | |
| newProps, | |
| rootContainerInstance, | |
| hostContext | |
| ) { | |
| const propKeys = new Set( | |
| Object.keys(newProps).concat( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| class App extends Component { | |
| constructor() { | |
| super(); | |
| this.state = { | |
| count: 0 | |
| }; | |
| } | |
| render() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| finalizeInitialChildren( | |
| domElement, | |
| type, | |
| props, | |
| rootContainerInstance, | |
| hostContext | |
| ) { | |
| const { children, ...otherProps } = props; | |
| Object.keys(otherProps).forEach(attr => { | |
| if (attr === 'className') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import ReactReconciler from 'react-reconciler'; | |
| const hostConfig = { | |
| getRootHostContext(rootContainerInstance) { | |
| return {} | |
| }, | |
| getChildHostContext(parentHostContext, type, rootContainerInstance) { | |
| return {}; | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const hostConfig = { | |
| getRootHostContext(rootContainerInstance) { | |
| }, | |
| getChildHostContext(parentHostContext, type, rootContainerInstance) { | |
| }, | |
| getPublicInstance(instance) { | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import ReactReconciler from 'react-reconciler'; | |
| const hostConfig = {}; | |
| const DOMRenderer = ReactReconciler(hostConfig); | |
| let internalContainerStructure; | |
| export default { | |
| render(elements, containerNode, callback) { | |
| // We must do this only once |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import ReactDOM from './renderer.js'; | |
| import './index.css'; | |
| import App from './App'; | |
| import registerServiceWorker from './registerServiceWorker'; | |
| ReactDOM.render(<App />, document.getElementById('root')); | |
| registerServiceWorker(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export default {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| class App extends Component { | |
| constructor() { | |
| super(); | |
| this.state = { | |
| count: 0 | |
| }; | |
| } | |
| render() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import css from 'dom-helpers/style'; | |
| import Reconciler from 'react-reconciler'; | |
| const isEventRegex = /^on([A-Z][a-zA-Z]+)$/; | |
| const RDL = Reconciler({ | |
| getRootHostContext() { | |
| return ''; | |
| }, | |
| getChildHostContext() { |