forked from alexmingoia/pux-todomvc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
React side of reproduction of alexmingoia/purescript-pux#132
- Loading branch information
1 parent
c67b8f3
commit 3ddd513
Showing
8 changed files
with
830 additions
and
5 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"plugins": [ | ||
["module-resolver", { | ||
"root": ["./src"], | ||
"alias": { | ||
"react": "preact-compat", | ||
"react-dom": "preact-compat" | ||
} | ||
}] | ||
], | ||
"presets": ["es2015", "react", "stage-0"] | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
'use strict'; | ||
|
||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.listComponent = undefined; | ||
|
||
var _preactCompat = require('preact-compat'); | ||
|
||
var _preactCompat2 = _interopRequireDefault(_preactCompat); | ||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
|
||
var listComponent = exports.listComponent = function listComponent(_ref) { | ||
var children = _ref.children; | ||
|
||
console.log('listSort.children', children); | ||
return _preactCompat2.default.createElement( | ||
'ul', | ||
null, | ||
children | ||
); | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module App.Component where | ||
|
||
import React (ReactClass) | ||
|
||
import Pux.DOM.HTML (HTML) | ||
import Pux.Renderer.React (reactClass) | ||
|
||
foreign import listComponent :: ∀ props. ReactClass props | ||
|
||
list :: ∀ ev. HTML ev -> HTML ev | ||
list = reactClass listComponent "list" |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react'; | ||
|
||
export const listComponent = ({ children }) => { | ||
console.log('listSort.children', children); | ||
return ( | ||
<ul> | ||
{children} | ||
</ul> | ||
); | ||
}; |
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