{"action":"opened","issue":{"url":"https://api.github.com/repos/reactuate/reactuate/issues/9","labels_url":"https://api.github.com/repos/reactuate/reactuate/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/reactuate/reactuate/issues/9/comments","events_url":"https://api.github.com/repos/reactuate/reactuate/issues/9/events","html_url":"https://github.com/reactuate/reactuate/issues/9","id":130281805,"number":9,"title":"Proposal: using tcomb-react in the view layer","user":{"login":"gcanti","id":878912,"avatar_url":"https://avatars.githubusercontent.com/u/878912?v=3","gravatar_id":"","url":"https://api.github.com/users/gcanti","html_url":"https://github.com/gcanti","followers_url":"https://api.github.com/users/gcanti/followers","following_url":"https://api.github.com/users/gcanti/following{/other_user}","gists_url":"https://api.github.com/users/gcanti/gists{/gist_id}","starred_url":"https://api.github.com/users/gcanti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gcanti/subscriptions","organizations_url":"https://api.github.com/users/gcanti/orgs","repos_url":"https://api.github.com/users/gcanti/repos","events_url":"https://api.github.com/users/gcanti/events{/privacy}","received_events_url":"https://api.github.com/users/gcanti/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-01T07:22:50Z","updated_at":"2016-02-01T07:22:50Z","closed_at":null,"body":"Since you are using `tcomb` in the domain layer, [tcomb-react](https://github.com/gcanti/tcomb-react) would be handy in order to re-utilize your domain models as prop types:\r\n\r\n```js\r\nimport React from 'react'\r\nimport user from '../user' // domain\r\nimport { props, t } from 'tcomb-react'\r\n\r\n@props({\r\n  user: user.User,\r\n  message: t.String\r\n})\r\nclass Message extends React.Component {\r\n  \r\n  render() {\r\n    return (\r\n      <div> \r\n        <p><label>Email</label> {this.props.user.email}</p>\r\n        <p><label>Message</label> {this.props.message}</p>\r\n      </div>\r\n    )\r\n  }\r\n\r\n}\r\n```"}}