{"action":"created","issue":{"url":"https://api.github.com/repos/lumihq/purescript-react-basic/issues/58","repository_url":"https://api.github.com/repos/lumihq/purescript-react-basic","labels_url":"https://api.github.com/repos/lumihq/purescript-react-basic/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/lumihq/purescript-react-basic/issues/58/comments","events_url":"https://api.github.com/repos/lumihq/purescript-react-basic/issues/58/events","html_url":"https://github.com/lumihq/purescript-react-basic/pull/58","id":366115673,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5ODczMjU4","number":58,"title":"Potential v4 API","user":{"login":"spicydonuts","id":715921,"node_id":"MDQ6VXNlcjcxNTkyMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/715921?v=4","gravatar_id":"","url":"https://api.github.com/users/spicydonuts","html_url":"https://github.com/spicydonuts","followers_url":"https://api.github.com/users/spicydonuts/followers","following_url":"https://api.github.com/users/spicydonuts/following{/other_user}","gists_url":"https://api.github.com/users/spicydonuts/gists{/gist_id}","starred_url":"https://api.github.com/users/spicydonuts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spicydonuts/subscriptions","organizations_url":"https://api.github.com/users/spicydonuts/orgs","repos_url":"https://api.github.com/users/spicydonuts/repos","events_url":"https://api.github.com/users/spicydonuts/events{/privacy}","received_events_url":"https://api.github.com/users/spicydonuts/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"spicydonuts","id":715921,"node_id":"MDQ6VXNlcjcxNTkyMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/715921?v=4","gravatar_id":"","url":"https://api.github.com/users/spicydonuts","html_url":"https://github.com/spicydonuts","followers_url":"https://api.github.com/users/spicydonuts/followers","following_url":"https://api.github.com/users/spicydonuts/following{/other_user}","gists_url":"https://api.github.com/users/spicydonuts/gists{/gist_id}","starred_url":"https://api.github.com/users/spicydonuts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spicydonuts/subscriptions","organizations_url":"https://api.github.com/users/spicydonuts/orgs","repos_url":"https://api.github.com/users/spicydonuts/repos","events_url":"https://api.github.com/users/spicydonuts/events{/privacy}","received_events_url":"https://api.github.com/users/spicydonuts/received_events","type":"User","site_admin":false},"assignees":[{"login":"spicydonuts","id":715921,"node_id":"MDQ6VXNlcjcxNTkyMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/715921?v=4","gravatar_id":"","url":"https://api.github.com/users/spicydonuts","html_url":"https://github.com/spicydonuts","followers_url":"https://api.github.com/users/spicydonuts/followers","following_url":"https://api.github.com/users/spicydonuts/following{/other_user}","gists_url":"https://api.github.com/users/spicydonuts/gists{/gist_id}","starred_url":"https://api.github.com/users/spicydonuts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spicydonuts/subscriptions","organizations_url":"https://api.github.com/users/spicydonuts/orgs","repos_url":"https://api.github.com/users/spicydonuts/repos","events_url":"https://api.github.com/users/spicydonuts/events{/privacy}","received_events_url":"https://api.github.com/users/spicydonuts/received_events","type":"User","site_admin":false}],"milestone":null,"comments":10,"created_at":"2018-10-02T23:16:58Z","updated_at":"2018-11-01T05:16:43Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/lumihq/purescript-react-basic/pulls/58","html_url":"https://github.com/lumihq/purescript-react-basic/pull/58","diff_url":"https://github.com/lumihq/purescript-react-basic/pull/58.diff","patch_url":"https://github.com/lumihq/purescript-react-basic/pull/58.patch"},"body":"These changes address a few things:\r\n\r\n- Allow typeclasses in component props or state\r\n- Allow any types as props and state, not just records\r\n- Support lifecycle functions such as `shouldUpdate` and `willUnmount`\r\n- Encourage (but not require) an Action-like API for component state\r\n\r\nI think this is ready enough for feedback. The API is extremely `reason-react` inspired (Reason has similar language requirements/constraints, the API is very close to vanilla React's besides the concept of Actions/update/reducer because Reason and PureScript have more powerful pattern matching abilities).\r\n\r\nThere are still a few bits I'm not super happy with -- I'll annotate the code to point them out.\r\n\r\nThis is a pretty significant change over `react-basic` 2.0. It's now less \"basic\" in the \"implement a small subset of vanilla React in PS, where 'basic' means small\" and instead more along the lines of \"implement a thin but opinionated wrapper around React, where 'basic' means encourage correctness without sacrificing performance or type complexity\". :slightly_smiling_face: \r\n\r\nRemaining work:\r\n\r\n- [x] Review API, feedback, etc\r\n- [ ] Write documentation\r\n- [x] Update the Lumi component library to use this branch to see how it feels and compare performance\r\n\r\nFixes #52\r\nFixes #53"},"comment":{"url":"https://api.github.com/repos/lumihq/purescript-react-basic/issues/comments/434933338","html_url":"https://github.com/lumihq/purescript-react-basic/pull/58#issuecomment-434933338","issue_url":"https://api.github.com/repos/lumihq/purescript-react-basic/issues/58","id":434933338,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNDkzMzMzOA==","user":{"login":"spicydonuts","id":715921,"node_id":"MDQ6VXNlcjcxNTkyMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/715921?v=4","gravatar_id":"","url":"https://api.github.com/users/spicydonuts","html_url":"https://github.com/spicydonuts","followers_url":"https://api.github.com/users/spicydonuts/followers","following_url":"https://api.github.com/users/spicydonuts/following{/other_user}","gists_url":"https://api.github.com/users/spicydonuts/gists{/gist_id}","starred_url":"https://api.github.com/users/spicydonuts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spicydonuts/subscriptions","organizations_url":"https://api.github.com/users/spicydonuts/orgs","repos_url":"https://api.github.com/users/spicydonuts/repos","events_url":"https://api.github.com/users/spicydonuts/events{/privacy}","received_events_url":"https://api.github.com/users/spicydonuts/received_events","type":"User","site_admin":false},"created_at":"2018-11-01T05:16:43Z","updated_at":"2018-11-01T05:16:43Z","author_association":"MEMBER","body":"@jgoux So, I took a stab at it: [Counter example with hooks](https://github.com/spicydonuts/purescript-react-basic/blob/hooks/examples/counter/src/Counter.purs)\r\n\r\nI actually am liking it.. :thinking: \r\n\r\nI saw that alt design too, and the interesting bit is that it's no different in PS.. do-syntax reads like the React proposal but compiles to the alt proposal :wink:"}}
{"actor":{"display_login":"spicydonuts"}}