{"action":"created","issue":{"url":"https://api.github.com/repos/lelandrichardson/react-primitives/issues/93","repository_url":"https://api.github.com/repos/lelandrichardson/react-primitives","labels_url":"https://api.github.com/repos/lelandrichardson/react-primitives/issues/93/labels{/name}","comments_url":"https://api.github.com/repos/lelandrichardson/react-primitives/issues/93/comments","events_url":"https://api.github.com/repos/lelandrichardson/react-primitives/issues/93/events","html_url":"https://github.com/lelandrichardson/react-primitives/issues/93","id":265674451,"number":93,"title":"Future of primitives?","user":{"login":"ktj","id":1543527,"avatar_url":"https://avatars0.githubusercontent.com/u/1543527?v=4","gravatar_id":"","url":"https://api.github.com/users/ktj","html_url":"https://github.com/ktj","followers_url":"https://api.github.com/users/ktj/followers","following_url":"https://api.github.com/users/ktj/following{/other_user}","gists_url":"https://api.github.com/users/ktj/gists{/gist_id}","starred_url":"https://api.github.com/users/ktj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktj/subscriptions","organizations_url":"https://api.github.com/users/ktj/orgs","repos_url":"https://api.github.com/users/ktj/repos","events_url":"https://api.github.com/users/ktj/events{/privacy}","received_events_url":"https://api.github.com/users/ktj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-10-16T07:44:29Z","updated_at":"2017-10-28T06:36:37Z","closed_at":null,"author_association":"NONE","body":"I've been using this project for a while and I think that the idea is great!\r\n\r\nRecently I started thinking, which way is to project heading to?\r\n\r\nYou have said that you aren't sure yet, which components are the right primitives.\r\nMany people have proposed the idea of adding TextInput as a primitive since it's desperatly needed for many apps.\r\nFirst I thought that TextInput should be added as a primitive since you can't even make a simple (login) form without it.\r\nI think that it's needed in all the targets mentioned in this projects issues (web, mobile, vr, sketchapp, console), but after a while I've also have come to the same conclusion that it shouldn't be added.\r\n\r\nThe reason is that TextInput has platform specific logic and some targets can't even implement it.\r\n\r\nEven when the basic idea for TextInput is the same across most of the targets, the platform specific nuances make it a different kind of a component on each target. I think that the same issues arise with Touchable.\r\n\r\nWhat if we remove all those problematic components/apis?\r\n\r\nThen we face an issue where no developer would choose to use react-primitives in their library since it lacks most of the required components for their needs. The developer would have to use platform extensions for a lot of stuff if they decided to use react-primitives.\r\n\r\nThis becomes an issue because now let's say we have some cool library for mobile and the developer used react-primitives, but the library uses TextInput from react-native.\r\nNow a new developer wants to use this for some other target (that can implement TextInput somehow).\r\nThe new developer can't use it unless the libs developer refactors that TextInput usage in a separate file and uses platform extensions to support that new target.\r\n\r\nThis adds lots of frustration for developers and libraries will most likely just keep supporting that one target.\r\n\r\nOne possible solution:\r\nSplit primitives into multiple smaller projects (lerna monorepo?)\r\nKeep primitives base very small. Example just View, Text, Image, StyleSheet.\r\nNow we can have the more problematic components/apis in separate projects.\r\nThen we don't have to bloat base with ”must have components” and introducing new targets isn't so exhausting.\r\n\r\nThe maintainer(s) of the new target could make PRs for each react-primitives-X project that they see fit.\r\n\r\nThis doesn't necessarily solve any problems, but could make primitives more usable across all targets.\r\n\r\nNow in that mobile lib example the new developer could just ask react-primitives-input library developer to support the new target instead of asking dozens of some other library developers to support his/her target.\r\n\r\nAny thoughts on this @lelandrichardson ?"},"comment":{"url":"https://api.github.com/repos/lelandrichardson/react-primitives/issues/comments/340146737","html_url":"https://github.com/lelandrichardson/react-primitives/issues/93#issuecomment-340146737","issue_url":"https://api.github.com/repos/lelandrichardson/react-primitives/issues/93","id":340146737,"user":{"login":"mikeaustin","id":343144,"avatar_url":"https://avatars1.githubusercontent.com/u/343144?v=4","gravatar_id":"","url":"https://api.github.com/users/mikeaustin","html_url":"https://github.com/mikeaustin","followers_url":"https://api.github.com/users/mikeaustin/followers","following_url":"https://api.github.com/users/mikeaustin/following{/other_user}","gists_url":"https://api.github.com/users/mikeaustin/gists{/gist_id}","starred_url":"https://api.github.com/users/mikeaustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikeaustin/subscriptions","organizations_url":"https://api.github.com/users/mikeaustin/orgs","repos_url":"https://api.github.com/users/mikeaustin/repos","events_url":"https://api.github.com/users/mikeaustin/events{/privacy}","received_events_url":"https://api.github.com/users/mikeaustin/received_events","type":"User","site_admin":false},"created_at":"2017-10-28T06:36:36Z","updated_at":"2017-10-28T06:36:36Z","author_association":"NONE","body":"So I found primitives through react-sketchapp, which allows you to create Sketch documents with React. Pretty cool. I've got a simple question: what is react-primitives? It has a dependency on react-native-web - which already provides View, Text, etc. - so I'm not quite sure. ? Thanks!"}}
{"actor":{"display_login":"mikeaustin"}}