{"action":"created","issue":{"url":"https://api.github.com/repos/peterp/react-native-tags/issues/19","repository_url":"https://api.github.com/repos/peterp/react-native-tags","labels_url":"https://api.github.com/repos/peterp/react-native-tags/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/peterp/react-native-tags/issues/19/comments","events_url":"https://api.github.com/repos/peterp/react-native-tags/issues/19/events","html_url":"https://github.com/peterp/react-native-tags/issues/19","id":350790413,"node_id":"MDU6SXNzdWUzNTA3OTA0MTM=","number":19,"title":"How to access tags via this.state","user":{"login":"bonbonio","id":10067670,"node_id":"MDQ6VXNlcjEwMDY3Njcw","avatar_url":"https://avatars2.githubusercontent.com/u/10067670?v=4","gravatar_id":"","url":"https://api.github.com/users/bonbonio","html_url":"https://github.com/bonbonio","followers_url":"https://api.github.com/users/bonbonio/followers","following_url":"https://api.github.com/users/bonbonio/following{/other_user}","gists_url":"https://api.github.com/users/bonbonio/gists{/gist_id}","starred_url":"https://api.github.com/users/bonbonio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bonbonio/subscriptions","organizations_url":"https://api.github.com/users/bonbonio/orgs","repos_url":"https://api.github.com/users/bonbonio/repos","events_url":"https://api.github.com/users/bonbonio/events{/privacy}","received_events_url":"https://api.github.com/users/bonbonio/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-08-15T12:26:09Z","updated_at":"2018-08-15T15:29:54Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\n\r\nI am looking at integrating this now the code shows no warnings, but the simple use case of using the list of tags elsewhere seems missing.\r\n\r\nI tried adding value={this.state.tags} \r\n\r\nI notice there is an add and remove method; do we need to push the tags into our state ourselves; this seems a bizarre requirement as its quite clear the component keeps its own array of unique tag values, I just can't see how its returned.\r\n\r\nI did try to append tags in the onChangeTags method, but it only returns the last tag; rather than the array, and it also removed the display functionality of the component where the tags are listed before the input...\r\n\r\nMight also make more sense to show the entered tags after the input rather than before it? Or have tagPrepend={false|true} \r\n\r\nMany thanks for this, maybe I am just being stupid though!"},"comment":{"url":"https://api.github.com/repos/peterp/react-native-tags/issues/comments/413234911","html_url":"https://github.com/peterp/react-native-tags/issues/19#issuecomment-413234911","issue_url":"https://api.github.com/repos/peterp/react-native-tags/issues/19","id":413234911,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzIzNDkxMQ==","user":{"login":"peterp","id":44849,"node_id":"MDQ6VXNlcjQ0ODQ5","avatar_url":"https://avatars0.githubusercontent.com/u/44849?v=4","gravatar_id":"","url":"https://api.github.com/users/peterp","html_url":"https://github.com/peterp","followers_url":"https://api.github.com/users/peterp/followers","following_url":"https://api.github.com/users/peterp/following{/other_user}","gists_url":"https://api.github.com/users/peterp/gists{/gist_id}","starred_url":"https://api.github.com/users/peterp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterp/subscriptions","organizations_url":"https://api.github.com/users/peterp/orgs","repos_url":"https://api.github.com/users/peterp/repos","events_url":"https://api.github.com/users/peterp/events{/privacy}","received_events_url":"https://api.github.com/users/peterp/received_events","type":"User","site_admin":false},"created_at":"2018-08-15T15:29:54Z","updated_at":"2018-08-15T15:29:54Z","author_association":"OWNER","body":"Ah, that's because you're re-rendering the component when you call `setState,` have a look at the following:\r\n```jsx\r\n<Tags\r\n  initialTags={this.state.tags}\r\n  onChangeTags={(tags) => this.setState({ tags })}\r\n/>\r\n```"}}
{"actor":{"display_login":"peterp"}}