{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/1777","labels_url":"https://api.github.com/repos/facebook/react-native/issues/1777/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/1777/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/1777/events","html_url":"https://github.com/facebook/react-native/issues/1777","id":91681688,"number":1777,"title":"[Native UI Components]  Better way needed to use third-part native UI widgets","user":{"login":"vincenting","id":1445522,"avatar_url":"https://avatars.githubusercontent.com/u/1445522?v=3","gravatar_id":"","url":"https://api.github.com/users/vincenting","html_url":"https://github.com/vincenting","followers_url":"https://api.github.com/users/vincenting/followers","following_url":"https://api.github.com/users/vincenting/following{/other_user}","gists_url":"https://api.github.com/users/vincenting/gists{/gist_id}","starred_url":"https://api.github.com/users/vincenting/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vincenting/subscriptions","organizations_url":"https://api.github.com/users/vincenting/orgs","repos_url":"https://api.github.com/users/vincenting/repos","events_url":"https://api.github.com/users/vincenting/events{/privacy}","received_events_url":"https://api.github.com/users/vincenting/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-29T03:16:44Z","updated_at":"2015-06-30T03:02:44Z","closed_at":null,"body":"Recently I'm tring hard to use [JVFloatLabeledTextField](https://github.com/jverdi/JVFloatLabeledTextField/) in my react-native app, referring to the doc [Native UI Components (iOS)](http://facebook.github.io/react-native/docs/nativecomponentsios.html#content). `JVFloatLabeledTextField` is also a inheritance of `UITextField` just like `RCTTextField`, because the lack of supporting of multiple inheritance in objective-c, i have to copy lots of code in `RCTTextField` and `RCTTextFieldManager` to finish my job. Then when it comes to nodejs, I also have to copy lots of javascript code from `Libraries/Components/TextInput`, to support lots of propTypes and end-to-end tests.\r\n\r\nThere are some other great third-part ui components in ios such as [FlatUIKit](https://github.com/Grouper/FlatUIKit). I do not think re-implement them with react(javascript) or copy lots of code in both objective-c and nodejs is a good idea.\r\n\r\n---\r\n\r\n1. In Objective-c, macros should be a better solution. `RCTTextFieldMacro.m` defines all methods and properties as macros those will be used in `RCTTextField` and `RCTTextFieldManager`. So we could use all these macros in our own ui components which has the same superclass, rather than copy those codes.\r\n2. In NodeJS, we can consider add some **inherit** method in `React.Component` rather than only mixins. So, extends `TextInput` and override or add some methods and props will be a better choice."},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/116928346","html_url":"https://github.com/facebook/react-native/issues/1777#issuecomment-116928346","issue_url":"https://api.github.com/repos/facebook/react-native/issues/1777","id":116928346,"user":{"login":"jtremback","id":1335122,"avatar_url":"https://avatars.githubusercontent.com/u/1335122?v=3","gravatar_id":"","url":"https://api.github.com/users/jtremback","html_url":"https://github.com/jtremback","followers_url":"https://api.github.com/users/jtremback/followers","following_url":"https://api.github.com/users/jtremback/following{/other_user}","gists_url":"https://api.github.com/users/jtremback/gists{/gist_id}","starred_url":"https://api.github.com/users/jtremback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtremback/subscriptions","organizations_url":"https://api.github.com/users/jtremback/orgs","repos_url":"https://api.github.com/users/jtremback/repos","events_url":"https://api.github.com/users/jtremback/events{/privacy}","received_events_url":"https://api.github.com/users/jtremback/received_events","type":"User","site_admin":false},"created_at":"2015-06-30T03:02:44Z","updated_at":"2015-06-30T03:02:44Z","body":":+1: I recognize the inherent advantages of reimplementing in React-Native, but it would be good to put some thought into this.... there may be components that are better off completely native for performance reasons.\r\n\r\n@vincenting:\r\n\r\n1. Maybe you can do a very small example of what you mean so that others can take on building out the concept to all the other components if it seems like a good idea.\r\n\r\n2. It sounds to me like you should try the new ES6 classes which support inheritance. Would these solve your problem?"}}