Run these commands:
npm i
npm start
You only have to run npm i the first time.
| Meiosis Routing with Mithril Router |
| import React, { Component } from 'react'; | |
| import { AppRegistry, Button, StyleSheet, Text, View } from 'react-native'; | |
| import { createComponent, run } from "meiosis"; | |
| // This is from the React Native hello world example. | |
| const styles = StyleSheet.create({ | |
| container: { | |
| flex: 1, | |
| justifyContent: 'center', | |
| alignItems: 'center', |
| test 1 |
| [ button | |
| [ class "btn btn-primary btn-xs" | |
| , onWithOptions | |
| "click" | |
| { preventDefault = True, stopPropagation = False } | |
| targetValue | |
| (always (Signal.message address (Save model.todo))) | |
| ] | |
| [ text "Save" ] |
| import Html exposing (Html, button, div, text) | |
| import Html.Events exposing (onClick) | |
| type alias Model = String | |
| type Action | |
| = NoOp | |
| | Show Model |
| // require() some stuff from npm (like you were using browserify) | |
| // and then hit Run Code to run it on the right | |
| var most = require("most"); | |
| var h = require("virtual-dom/h"); | |
| var diff = require("virtual-dom/diff"); | |
| var patch = require("virtual-dom/patch"); | |
| var createElement = require("virtual-dom/create-element"); | |
| var match = function(query) { | |
| return function(evt) { |
| // require() some stuff from npm (like you were using browserify) | |
| // and then hit Run Code to run it on the right | |
| var Maybe = require("data.maybe"); | |
| var f1 = function(input) { | |
| console.log("f1"); | |
| return null; | |
| }; | |
| var f2 = function(input) { | |
| console.log("f2"); |
| // require() some stuff from npm (like you were using browserify) | |
| // and then hit Run Code to run it on the right | |
| var most = require("most"); | |
| var h = require("virtual-dom/h"); | |
| var diff = require("virtual-dom/diff"); | |
| var patch = require("virtual-dom/patch"); | |
| var createElement = require("virtual-dom/create-element"); | |
| var match = function(query) { | |
| return function(evt) { |
| [ | |
| { | |
| "description": "Buy more beer", | |
| "id": 1, | |
| "priority": 1 | |
| }, | |
| { | |
| "description": "Order pizza", | |
| "id": 2, | |
| "priority": 1 |