├── fixtures └── packaging │ ├── rjs │ ├── .gitignore │ ├── index.html │ ├── input.js │ ├── package.json │ └── config.js │ ├── webpack │ ├── .gitignore │ ├── index.html │ ├── input.js │ ├── package.json │ └── config.js │ ├── systemjs-builder │ ├── .gitignore │ ├── index.html │ ├── config.js │ ├── input.js │ ├── package.json │ └── build.js │ ├── webpack-alias │ ├── .gitignore │ ├── index.html │ ├── input.js │ ├── package.json │ └── config.js │ ├── brunch │ ├── .gitignore │ ├── index.html │ ├── config.js │ ├── input.js │ ├── app │ │ └── initialize.js │ └── package.json │ ├── browserify │ ├── .gitignore │ ├── index.html │ ├── package.json │ └── input.js │ ├── globals.html │ ├── requirejs.html │ ├── systemjs.html │ ├── build-all.js │ └── README.md ├── packages ├── inferno-router │ ├── lib │ │ ├── Link.js │ │ ├── Route.js │ │ ├── match.js │ │ ├── IndexLink.js │ │ ├── Redirect.js │ │ ├── IndexRedirect.js │ │ ├── IndexRoute.js │ │ ├── RouterContext.js │ │ └── Router.js │ ├── index.js │ ├── src │ │ ├── IndexRoute.ts │ │ ├── Redirect.ts │ │ ├── IndexLink.ts │ │ ├── RouterContext.ts │ │ ├── index.ts │ │ ├── Link.ts │ │ ├── Router.ts │ │ ├── Route.ts │ │ ├── createRoutes.ts │ │ └── utils.ts │ ├── __tests__ │ │ ├── utils.spec.jsx │ │ └── createRoutes.spec.jsx │ └── package.json ├── inferno-devtools │ ├── src │ │ ├── index.ts │ │ └── init.ts │ ├── index.js │ ├── package.json │ └── README.md ├── inferno-compat │ ├── lib │ │ ├── ReactTransitionGroup.js │ │ ├── ReactCSSTransitionGroup.js │ │ ├── ReactMount.js │ │ ├── EventPropagators.js │ │ ├── SyntheticUIEvent.js │ │ ├── EventPluginHub.js │ │ ├── ViewportMetrics.js │ │ ├── shallowCompare.js │ │ ├── EventPluginUtils.js │ │ ├── ReactFragment.js │ │ ├── ReactTransitionEvents.js │ │ └── EventConstants.js │ ├── index.js │ ├── prop-types.js │ ├── src │ │ ├── isValidElement.ts │ │ └── PropTypes.ts │ ├── package.json │ ├── __tests__ │ │ └── svg.spec.jsx │ └── README.md ├── inferno │ ├── src │ │ ├── core │ │ │ ├── structures.ts │ │ │ └── options.ts │ │ ├── DOM │ │ │ ├── events │ │ │ │ └── linkEvent.ts │ │ │ ├── wrappers │ │ │ │ ├── processElement.ts │ │ │ │ ├── TextareaWrapper.ts │ │ │ │ └── SelectWrapper.ts │ │ │ ├── constants.ts │ │ │ └── recycling.ts │ │ ├── index.ts │ │ └── test │ │ │ └── utils.ts │ ├── index.js │ ├── __benchmarks__ │ │ └── rendering.js │ ├── package.json │ └── __tests__ │ │ ├── rendering.spec.js │ │ └── patching.spec.js ├── inferno-shared │ ├── index.js │ ├── package.json │ └── src │ │ └── index.ts ├── inferno-mobx │ ├── index.js │ ├── __tests__ │ │ ├── tracking.spec.js │ │ └── eventemitter.spec.js │ ├── src │ │ ├── index.ts │ │ ├── EventEmitter.ts │ │ ├── connect.ts │ │ ├── Provider.ts │ │ └── inject.ts │ ├── package.json │ └── README.md ├── inferno-component │ ├── index.js │ ├── README.md │ ├── package.json │ └── __tests__ │ │ └── state.spec.jsx ├── inferno-redux │ ├── index.js │ ├── src │ │ ├── index.ts │ │ ├── helpers.ts │ │ ├── Provider.ts │ │ └── utils.ts │ ├── package.json │ ├── __tests__ │ │ └── utils.spec.jsx │ └── README.md ├── inferno-server │ ├── index.js │ ├── README.md │ ├── src │ │ ├── index.ts │ │ ├── utils.ts │ │ └── prop-renderers.ts │ ├── package.json │ └── __tests__ │ │ └── creation-stream.spec.js ├── inferno-create-class │ ├── index.js │ ├── README.md │ └── package.json ├── inferno-create-element │ ├── index.js │ ├── __tests__ │ │ ├── data │ │ │ └── common-render │ │ │ │ ├── parentfirstcommon.jsx │ │ │ │ ├── parentsecondcommon.jsx │ │ │ │ ├── parentbase.jsx │ │ │ │ └── child.jsx │ │ ├── clonenode.spec.jsx │ │ ├── normalizeProps.spec.jsx │ │ ├── findDOMNodes.spec.jsx │ │ ├── functional.spec.jsx │ │ └── svgXlink.spec.jsx │ ├── readme.md │ ├── package.json │ ├── __benchmarks__ │ │ ├── functionalcomponents.js │ │ └── classcomponents.js │ └── src │ │ └── index.ts ├── inferno-hyperscript │ ├── index.js │ ├── package.json │ └── README.md ├── inferno-test-utils │ ├── index.js │ ├── __tests__ │ │ └── testutilevents.spec.jsx │ ├── package.json │ └── src │ │ └── jest.ts └── inferno-vnode-flags │ ├── index.js │ ├── src │ └── index.ts │ ├── package.json │ └── README.md ├── .eslintignore ├── .npmignore ├── benchmarks ├── README.md ├── dbmonster │ ├── index.html │ ├── style.css │ └── app.js ├── uibench │ └── index.html ├── uibench-nonkeyed │ └── index.html ├── async-render │ ├── index.html │ └── app.js └── vdom-bench │ └── index.html ├── test ├── mocha.opts ├── data │ └── separate-render │ │ ├── parentfirstseparate.tsx │ │ ├── parentsecondseparate.tsx │ │ └── childseparate.tsx ├── lint │ └── letter-only-props.js ├── karma │ ├── karma.bench.conf.js │ ├── sauce.js │ ├── karma.unit.conf.js │ ├── bench.js │ └── karma.base.conf.js └── mocha │ └── DOM.js ├── .gitattributes ├── .editorconfig ├── examples ├── playground │ ├── index.html │ └── playground.js ├── routing │ ├── index.html │ └── routing.js ├── attributes │ └── index.html └── devtools │ └── index.html ├── browser └── jsfiddle-integration-babel.js ├── lerna.json ├── tsconfig.json ├── .gitignore ├── .github ├── PULL_REQUEST_TEMPLATE.md └── ISSUE_TEMPLATE.md ├── .travis.yml ├── tslint.json ├── bin └── link ├── LICENSE.md ├── .babelrc └── config ├── index.html └── webpack.dev.conf.js /fixtures/packaging/rjs/.gitignore: -------------------------------------------------------------------------------- 1 | output.js 2 | node_modules 3 | -------------------------------------------------------------------------------- /fixtures/packaging/webpack/.gitignore: -------------------------------------------------------------------------------- 1 | output.js 2 | node_modules 3 | -------------------------------------------------------------------------------- /fixtures/packaging/systemjs-builder/.gitignore: -------------------------------------------------------------------------------- 1 | output.js 2 | node_modules 3 | -------------------------------------------------------------------------------- /fixtures/packaging/webpack-alias/.gitignore: -------------------------------------------------------------------------------- 1 | output.js 2 | node_modules 3 | -------------------------------------------------------------------------------- /packages/inferno-router/lib/Link.js: -------------------------------------------------------------------------------- 1 | module.exports = require('../').Link; 2 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | **/*.min.js 2 | packages/inferno/dist/* 3 | examples/**/dist/* 4 | -------------------------------------------------------------------------------- /packages/inferno-router/lib/Route.js: -------------------------------------------------------------------------------- 1 | module.exports = require('../').Route; 2 | -------------------------------------------------------------------------------- /packages/inferno-router/lib/match.js: -------------------------------------------------------------------------------- 1 | module.exports = require('../').match; 2 | -------------------------------------------------------------------------------- /fixtures/packaging/brunch/.gitignore: -------------------------------------------------------------------------------- 1 | output.js 2 | output.js.map 3 | node_modules 4 | -------------------------------------------------------------------------------- /packages/inferno-router/lib/IndexLink.js: -------------------------------------------------------------------------------- 1 | module.exports = require('../').IndexLink; 2 | -------------------------------------------------------------------------------- /packages/inferno-router/lib/Redirect.js: -------------------------------------------------------------------------------- 1 | module.exports = require('../').Redirect; 2 | -------------------------------------------------------------------------------- /fixtures/packaging/browserify/.gitignore: -------------------------------------------------------------------------------- 1 | output.js 2 | node_modules 3 | npm-debug.log 4 | -------------------------------------------------------------------------------- /packages/inferno-router/lib/IndexRedirect.js: -------------------------------------------------------------------------------- 1 | module.exports = require('../').Redirect; 2 | -------------------------------------------------------------------------------- /packages/inferno-router/lib/IndexRoute.js: -------------------------------------------------------------------------------- 1 | module.exports = require('../').IndexRoute; 2 | -------------------------------------------------------------------------------- /packages/inferno-router/lib/RouterContext.js: -------------------------------------------------------------------------------- 1 | module.exports = require('../').RouterContext; 2 | -------------------------------------------------------------------------------- /packages/inferno-devtools/src/index.ts: -------------------------------------------------------------------------------- 1 | import initDevTools from './init'; 2 | 3 | initDevTools(); 4 | -------------------------------------------------------------------------------- /packages/inferno-compat/lib/ReactTransitionGroup.js: -------------------------------------------------------------------------------- 1 | module.exports = require('inferno-transition-group'); -------------------------------------------------------------------------------- /packages/inferno/src/core/structures.ts: -------------------------------------------------------------------------------- 1 | export interface Styles { 2 | [key: string]: number | string; 3 | } 4 | -------------------------------------------------------------------------------- /packages/inferno-compat/lib/ReactCSSTransitionGroup.js: -------------------------------------------------------------------------------- 1 | module.exports = require('rc-css-transition-group-modern'); 2 | -------------------------------------------------------------------------------- /packages/inferno-compat/lib/ReactMount.js: -------------------------------------------------------------------------------- 1 | exports.unmountComponentAtNode = require('inferno-compat').unmountComponentAtNode; -------------------------------------------------------------------------------- /packages/inferno-shared/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./dist'); 2 | module.exports.default = module.exports; 3 | 4 | -------------------------------------------------------------------------------- /packages/inferno/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./dist').default; 2 | module.exports.default = module.exports; 3 | 4 | -------------------------------------------------------------------------------- /packages/inferno-compat/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./dist').default; 2 | module.exports.default = module.exports; 3 | -------------------------------------------------------------------------------- /packages/inferno-devtools/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./dist'); 2 | module.exports.default = module.exports; 3 | 4 | -------------------------------------------------------------------------------- /packages/inferno-mobx/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./dist').default; 2 | module.exports.default = module.exports; 3 | 4 | -------------------------------------------------------------------------------- /packages/inferno-component/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./dist').default; 2 | module.exports.default = module.exports; 3 | 4 | -------------------------------------------------------------------------------- /packages/inferno-redux/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./dist').default; 2 | module.exports.default = module.exports; 3 | 4 | -------------------------------------------------------------------------------- /packages/inferno-router/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./dist').default; 2 | module.exports.default = module.exports; 3 | 4 | -------------------------------------------------------------------------------- /packages/inferno-server/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./dist').default; 2 | module.exports.default = module.exports; 3 | 4 | -------------------------------------------------------------------------------- /packages/inferno-create-class/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./dist').default; 2 | module.exports.default = module.exports; 3 | 4 | -------------------------------------------------------------------------------- /packages/inferno-create-element/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./dist').default; 2 | module.exports.default = module.exports; 3 | 4 | -------------------------------------------------------------------------------- /packages/inferno-hyperscript/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./dist').default; 2 | module.exports.default = module.exports; 3 | 4 | -------------------------------------------------------------------------------- /packages/inferno-test-utils/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./dist').default; 2 | module.exports.default = module.exports; 3 | 4 | -------------------------------------------------------------------------------- /packages/inferno-vnode-flags/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./dist').default; 2 | module.exports.default = module.exports; 3 | 4 | -------------------------------------------------------------------------------- /packages/inferno-compat/prop-types.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./dist/PropTypes').default; 2 | module.exports.default = module.exports; 3 | -------------------------------------------------------------------------------- /fixtures/packaging/webpack/index.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /fixtures/packaging/systemjs-builder/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /fixtures/packaging/webpack-alias/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /packages/inferno-router/lib/Router.js: -------------------------------------------------------------------------------- 1 | const InfernoRouter = require('../'); 2 | 3 | module.exports = InfernoRouter.Router; 4 | module.exports.getRoutes = InfernoRouter.IndexRoute; 5 | -------------------------------------------------------------------------------- /fixtures/packaging/systemjs-builder/config.js: -------------------------------------------------------------------------------- 1 | System.config({ 2 | paths: { 3 | react: '../../../build/react.js', 4 | 'react-dom': '../../../build/react-dom.js', 5 | }, 6 | }); 7 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .* 2 | *.log 3 | *.swp 4 | *.yml 5 | bower.json 6 | coverage 7 | config 8 | dist/*.map 9 | test 10 | __tests__ 11 | 12 | tsconfig.json 13 | tsconfig.*.json 14 | npm-debug.log* 15 | -------------------------------------------------------------------------------- /benchmarks/README.md: -------------------------------------------------------------------------------- 1 | # Examples 2 | | Various examples to show the power of Inferno 3 | 4 | ## How to use? 5 | 6 | Run Http-server at the root of Repository and Open up the .html file in your browser. 7 | -------------------------------------------------------------------------------- /fixtures/packaging/brunch/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /fixtures/packaging/brunch/config.js: -------------------------------------------------------------------------------- 1 | exports.config = { 2 | paths: { 3 | public: '.', 4 | }, 5 | files: { 6 | javascripts: { 7 | joinTo: 'output.js', 8 | }, 9 | }, 10 | }; 11 | -------------------------------------------------------------------------------- /packages/inferno-compat/lib/EventPropagators.js: -------------------------------------------------------------------------------- 1 | // so generates no-ops for now, we probably need to make this actually work? 2 | module.exports = { 3 | accumulateTwoPhaseDispatches: function() { 4 | } 5 | }; 6 | -------------------------------------------------------------------------------- /packages/inferno-compat/lib/SyntheticUIEvent.js: -------------------------------------------------------------------------------- 1 | // so generates no-ops for now, we probably need to make this actually work? 2 | module.exports = { 3 | SyntheticUIEvent: function() { 4 | return {}; 5 | } 6 | }; 7 | -------------------------------------------------------------------------------- /test/mocha.opts: -------------------------------------------------------------------------------- 1 | --compilers js:babel-register 2 | --require ./test/mocha/DOM.js 3 | --full-trace 4 | --reporter spec 5 | --ui bdd 6 | --recursive 7 | --timeout 15000 8 | 9 | packages/*/__tests__/**/*.js* 10 | -------------------------------------------------------------------------------- /fixtures/packaging/browserify/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /fixtures/packaging/rjs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /fixtures/packaging/rjs/input.js: -------------------------------------------------------------------------------- 1 | require(['react', 'react-dom'], function(React, ReactDOM) { 2 | ReactDOM.render( 3 | React.createElement('h1', null, 'Hello World!'), 4 | document.getElementById('container') 5 | ); 6 | }); 7 | -------------------------------------------------------------------------------- /packages/inferno-compat/lib/EventPluginHub.js: -------------------------------------------------------------------------------- 1 | // so generates no-ops for now, we probably need to make this actually work? 2 | module.exports = { 3 | injection: { 4 | injectEventPluginsByName: function() { 5 | } 6 | } 7 | }; 8 | -------------------------------------------------------------------------------- /packages/inferno-redux/src/index.ts: -------------------------------------------------------------------------------- 1 | import connect from './connect'; 2 | import Provider from './Provider'; 3 | 4 | export default { 5 | Provider, 6 | connect 7 | }; 8 | 9 | export { 10 | Provider, 11 | connect 12 | }; 13 | -------------------------------------------------------------------------------- /fixtures/packaging/brunch/input.js: -------------------------------------------------------------------------------- 1 | var React = require('react'); 2 | var ReactDOM = require('react-dom'); 3 | 4 | ReactDOM.render( 5 | React.createElement('h1', null, 'Hello World!'), 6 | document.getElementById('container') 7 | ); 8 | -------------------------------------------------------------------------------- /fixtures/packaging/webpack/input.js: -------------------------------------------------------------------------------- 1 | var React = require('react'); 2 | var ReactDOM = require('react-dom'); 3 | 4 | ReactDOM.render( 5 | React.createElement('h1', null, 'Hello World!'), 6 | document.getElementById('container') 7 | ); 8 | -------------------------------------------------------------------------------- /fixtures/packaging/systemjs-builder/input.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | 4 | ReactDOM.render( 5 | React.createElement('h1', null, 'Hello World!'), 6 | document.getElementById('container') 7 | ); 8 | -------------------------------------------------------------------------------- /fixtures/packaging/webpack-alias/input.js: -------------------------------------------------------------------------------- 1 | var React = require('react'); 2 | var ReactDOM = require('react-dom'); 3 | 4 | ReactDOM.render( 5 | React.createElement('h1', null, 'Hello World!'), 6 | document.getElementById('container') 7 | ); 8 | -------------------------------------------------------------------------------- /packages/inferno-router/src/IndexRoute.ts: -------------------------------------------------------------------------------- 1 | import Route from './Route'; 2 | 3 | export default class IndexRoute extends Route { 4 | constructor(props?: any, context?: any) { 5 | super(props, context); 6 | props.path = '/'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /fixtures/packaging/brunch/app/initialize.js: -------------------------------------------------------------------------------- 1 | var React = require('react'); 2 | var ReactDOM = require('react-dom'); 3 | 4 | ReactDOM.render( 5 | React.createElement('h1', null, 'Hello World!'), 6 | document.getElementById('container') 7 | ); 8 | -------------------------------------------------------------------------------- /fixtures/packaging/rjs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rjs-test", 3 | "private": true, 4 | "dependencies": { 5 | "requirejs": "^2.3.2" 6 | }, 7 | "scripts": { 8 | "build": "rm -f output.js && r.js -o config.js" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /fixtures/packaging/webpack/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "webpack-test", 3 | "private": true, 4 | "dependencies": { 5 | "webpack": "^1.14.0" 6 | }, 7 | "scripts": { 8 | "build": "rm -f output.js && webpack --config config.js" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /fixtures/packaging/rjs/config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | baseUrl: '.', 3 | name: 'input', 4 | out: 'output.js', 5 | optimize: 'none', 6 | paths: { 7 | react: '../../../build/react', 8 | 'react-dom': '../../../build/react-dom', 9 | }, 10 | }; 11 | -------------------------------------------------------------------------------- /fixtures/packaging/webpack-alias/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "webpack-test", 3 | "private": true, 4 | "dependencies": { 5 | "webpack": "^1.14.0" 6 | }, 7 | "scripts": { 8 | "build": "rm -f output.js && webpack --config config.js" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /fixtures/packaging/webpack/config.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | 3 | module.exports = { 4 | entry: './input', 5 | output: { 6 | filename: 'output.js', 7 | }, 8 | resolve: { 9 | root: path.resolve('../../../build/packages/'), 10 | }, 11 | }; 12 | -------------------------------------------------------------------------------- /packages/inferno-router/src/Redirect.ts: -------------------------------------------------------------------------------- 1 | import Route from './Route'; 2 | 3 | export default class Redirect extends Route { 4 | constructor(props?: any, context?: any) { 5 | super(props, context); 6 | if (!props.to) { 7 | props.to = '/'; 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /fixtures/packaging/systemjs-builder/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "systemjs-builder-test", 3 | "private": true, 4 | "dependencies": { 5 | "systemjs-builder": "^0.15.34" 6 | }, 7 | "scripts": { 8 | "build": "rm -f output.js && node build.js" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/inferno-create-element/__tests__/data/common-render/parentfirstcommon.jsx: -------------------------------------------------------------------------------- 1 | import { ParentBaseCommon } from './parentbase'; 2 | 3 | export class ParentFirstCommon extends ParentBaseCommon { 4 | constructor(props) { 5 | super(props); 6 | 7 | this.foo = 'First'; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/inferno-create-element/__tests__/data/common-render/parentsecondcommon.jsx: -------------------------------------------------------------------------------- 1 | import { ParentBaseCommon } from './parentbase'; 2 | 3 | export class ParentSecondCommon extends ParentBaseCommon { 4 | constructor(props) { 5 | super(props); 6 | 7 | this.foo = 'Second'; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | 3 | *.css text eol=lf 4 | *.js text eol=lf 5 | *.jsx text eol=lf 6 | *.ts text eol=lf linguist-language=JavaScript 7 | *.tsx text eol=lf linguist-language=JavaScript 8 | *.json text eol=lf 9 | *.html text eol=lf 10 | *.md text eol=lf 11 | .gitattributes text eol=lf 12 | -------------------------------------------------------------------------------- /packages/inferno-router/src/IndexLink.ts: -------------------------------------------------------------------------------- 1 | import { createVNode, VNode } from 'inferno'; 2 | import VNodeFlags from 'inferno-vnode-flags'; 3 | import Link from './Link'; 4 | 5 | export default function IndexLink(props): VNode { 6 | props.to = '/'; 7 | return createVNode(VNodeFlags.ComponentFunction, Link, null, null, props); 8 | } 9 | -------------------------------------------------------------------------------- /packages/inferno-create-element/__tests__/data/common-render/parentbase.jsx: -------------------------------------------------------------------------------- 1 | import Component from 'inferno-component'; 2 | import { ChildCommon } from './child'; 3 | 4 | export class ParentBaseCommon extends Component { 5 | render() { 6 | return ( 7 |13 |

15 | 16 | This package provides the bindings for MobX and Inferno. 17 | Exports `observer` and `connect` decorators, a `Provider` and some development utilities. 18 | 19 | ## Install 20 | 21 | ``` 22 | npm install --save inferno-mobx 23 | ``` 24 | 25 | Also install [mobx](https://github.com/mobxjs/mobx) dependency _(required)_ if you don't already have it 26 | 27 | ``` 28 | npm install --save mobx 29 | ``` 30 | 31 | ## Example 32 | 33 | You can inject props using the following syntax 34 | 35 | ```javascript 36 | // MyComponent.js 37 | import Inferno from 'inferno' 38 | import Component from 'inferno-component' 39 | import { connect } from 'inferno-mobx' 40 | 41 | @connect(['englishStore', 'frenchStore']) 42 | class MyComponent extends Component { 43 | render({ englishStore, frenchStore }) { 44 | return
{ englishStore.title }
46 |{ frenchStore.title }
47 |