From b2128609ac8159a14224deba399144b3400c8c20 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Sun, 13 Nov 2016 08:16:12 +0100 Subject: Finally give in and use React, minor tweeks. Preact (a minimalistic React alternative) had too many bugs ... --- thirdparty/preact/src/component.js | 102 ------------------------------------- 1 file changed, 102 deletions(-) delete mode 100644 thirdparty/preact/src/component.js (limited to 'thirdparty/preact/src/component.js') diff --git a/thirdparty/preact/src/component.js b/thirdparty/preact/src/component.js deleted file mode 100644 index aefaebe98..000000000 --- a/thirdparty/preact/src/component.js +++ /dev/null @@ -1,102 +0,0 @@ -import { FORCE_RENDER } from './constants'; -import { extend, clone, isFunction } from './util'; -import { createLinkedState } from './linked-state'; -import { renderComponent } from './vdom/component'; -import { enqueueRender } from './render-queue'; - -/** Base Component class, for he ES6 Class method of creating Components - * @public - * - * @example - * class MyFoo extends Component { - * render(props, state) { - * return
; - * } - * } - */ -export function Component(props, context) { - /** @private */ - this._dirty = true; - // /** @public */ - // this._disableRendering = false; - // /** @public */ - // this.prevState = this.prevProps = this.prevContext = this.base = this.nextBase = this._parentComponent = this._component = this.__ref = this.__key = this._linkedStates = this._renderCallbacks = null; - /** @public */ - this.context = context; - /** @type {object} */ - this.props = props; - /** @type {object} */ - if (!this.state) this.state = {}; -} - - -extend(Component.prototype, { - - /** Returns a `boolean` value indicating if the component should re-render when receiving the given `props` and `state`. - * @param {object} nextProps - * @param {object} nextState - * @param {object} nextContext - * @returns {Boolean} should the component re-render - * @name shouldComponentUpdate - * @function - */ - // shouldComponentUpdate() { - // return true; - // }, - - - /** Returns a function that sets a state property when called. - * Calling linkState() repeatedly with the same arguments returns a cached link function. - * - * Provides some built-in special cases: - * - Checkboxes and radio buttons link their boolean `checked` value - * - Inputs automatically link their `value` property - * - Event paths fall back to any associated Component if not found on an element - * - If linked value is a function, will invoke it and use the result - * - * @param {string} key The path to set - can be a dot-notated deep key - * @param {string} [eventPath] If set, attempts to find the new state value at a given dot-notated path within the object passed to the linkedState setter. - * @returns {function} linkStateSetter(e) - * - * @example Update a "text" state value when an input changes: - * - * - * @example Set a deep state value on click - *