-
Notifications
You must be signed in to change notification settings - Fork 4
/
todos
42 lines (26 loc) · 1.12 KB
/
todos
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
- indent html code for js
- tests for js code
- default function args
const elem = React.createElement("div", {
children: "Hello World",
className: "container"
});
ReactDOM.render(element, rootElement)
OR
const elem = React.createElement("div", {
className: "container"
},
"Hello World", // add as many args as you want for the children
"Goodbye World"
);
ReactDOM.render(element, rootElement)
- passing callbacks down a react tree is painful, one solution would be to use a state monad
This doesn't work:
state.map(\todo -> if todo.id == action.id then todo <> { completed: !todo.completed } else todo)
salty compiles it correctly, but js needs braces around the if in the map.
allow partial operations as hash values
in a where clause, all those vars need to be defined w a const or a let.
---
would be cool to add some basic checks as warnings. Like constructors of react components need to have a super(props) call.
getChildContext needs to be matched with a childContextTypes. Functions that use a context need to define contextTypes. etc.
listings.prices.0 should resolve to listing.prices[0]