-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #146 from JordanMartinez/update-to-15
Update to PureScript 0.15.0
- Loading branch information
Showing
4 changed files
with
59 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |