Skip to content

Commit

Permalink
Merge pull request #146 from JordanMartinez/update-to-15
Browse files Browse the repository at this point in the history
Update to PureScript 0.15.0
  • Loading branch information
megamaddu authored May 14, 2022
2 parents 8b031f8 + 5da7fa8 commit 76aff18
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 50 deletions.
38 changes: 19 additions & 19 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"name": "purescript-react-basic",
"license": [
"Apache-2.0"
],
"repository": {
"type": "git",
"url": "https://github.com/lumihq/purescript-react-basic"
},
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"output"
],
"dependencies": {
"purescript-effect": "^v3.0.0",
"purescript-prelude": "^v5.0.0",
"purescript-record": "^v3.0.0"
}
"name": "purescript-react-basic",
"license": [
"Apache-2.0"
],
"repository": {
"type": "git",
"url": "https://github.com/lumihq/purescript-react-basic"
},
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"output"
],
"dependencies": {
"purescript-effect": "^4.0.0",
"purescript-prelude": "^6.0.0",
"purescript-record": "^4.0.0"
}
}
3 changes: 2 additions & 1 deletion packages.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ in upstream
-------------------------------
-}
let upstream =
https://github.com/purescript/package-sets/releases/download/psc-0.14.0/packages.dhall sha256:710b53c085a18aa1263474659daa0ae15b7a4f453158c4f60ab448a6b3ed494e
https://github.com/purescript/package-sets/releases/download/psc-0.15.0-20220510/packages.dhall
sha256:0b0d4db1f2f0acd3b37fa53220644ac6f64cf9b5d0226fd097c0593df563d5be

in upstream
61 changes: 36 additions & 25 deletions src/React/Basic.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,39 @@
"use strict";

const React = require("react");
import React from "react";
const createElement = React.createElement;
const Fragment = React.Fragment;

exports.empty = null;

exports.keyed = (key) => (child) =>
createElement(Fragment, { key: key }, child);

exports.element = (component) => (props) =>
Array.isArray(props.children)
? createElement.apply(null, [component, props].concat(props.children))
: createElement(component, props);

exports.elementKeyed = (component) => (props) =>
createElement(component, props);

exports.fragment = (children) =>
createElement.apply(null, [Fragment, null].concat(children));

exports.createContext = (defaultValue) => () =>
React.createContext(defaultValue);

exports.contextProvider = (context) => context.Provider;

exports.contextConsumer = (context) => context.Consumer;
export const empty = null;

export function keyed(key) {
return (child) =>
createElement(Fragment, { key: key }, child);
}

export function element(component) {
return (props) =>
Array.isArray(props.children)
? createElement.apply(null, [component, props].concat(props.children))
: createElement(component, props);
}

export function elementKeyed(component) {
return (props) =>
createElement(component, props);
}

export function fragment(children) {
return createElement.apply(null, [Fragment, null].concat(children));
}

export function createContext(defaultValue) {
return () =>
React.createContext(defaultValue);
}

export function contextProvider(context) {
return context.Provider;
}

export function contextConsumer(context) {
return context.Consumer;
}
7 changes: 2 additions & 5 deletions src/React/Basic/StrictMode.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
"use strict";

const React = require("react");

exports.strictMode_ = React.StrictMode;
import React from "react";
export const strictMode_ = React.StrictMode;

0 comments on commit 76aff18

Please sign in to comment.