How to use nornj - 2 common examples

To help you get started, we’ve selected a few nornj examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github joe-sky / nornj / examples / react-redux-nornj-todomvc / containers / App.js View on Github external
return !todo.completed;
      });
  }
}

// Which props do we want to inject, given the global state?
// Note: use https://github.com/faassen/reselect for better performance.
function select(state) {
  return {
    visibleTodos: selectTodos(state.todos, state.visibilityFilter),
    visibilityFilter: state.visibilityFilter
  };
}

//Wrap component,inject dispatch and state into its default connect(select)(App)
const App = registerComponent('App', connect(select)(_App));
export default App;
github joe-sky / nornj / packages / nornj-react / src / extension / mobx / base.ts View on Github external
import { registerComponent, registerFilter } from 'nornj';
import { toJS } from 'mobx';
import { Provider } from 'mobx-react';
import './mobxBind';
import './mobxObserver';

registerComponent('mobx-Provider', Provider);
registerFilter('toJS', v => toJS(v));

nornj

A powerful template engine that can works with React, JSX enhancement or alternative tools.

MIT
Latest version published 2 years ago

Package Health Score

45 / 100
Full package analysis

Popular nornj functions