{"action":"created","issue":{"url":"https://api.github.com/repos/flutter/flutter/issues/19269","repository_url":"https://api.github.com/repos/flutter/flutter","labels_url":"https://api.github.com/repos/flutter/flutter/issues/19269/labels{/name}","comments_url":"https://api.github.com/repos/flutter/flutter/issues/19269/comments","events_url":"https://api.github.com/repos/flutter/flutter/issues/19269/events","html_url":"https://github.com/flutter/flutter/issues/19269","id":340315658,"node_id":"MDU6SXNzdWUzNDAzMTU2NTg=","number":19269,"title":"Why should I ever use stateless widgets instead of functional widgets?","user":{"login":"lukepighetti","id":666539,"node_id":"MDQ6VXNlcjY2NjUzOQ==","avatar_url":"https://avatars1.githubusercontent.com/u/666539?v=4","gravatar_id":"","url":"https://api.github.com/users/lukepighetti","html_url":"https://github.com/lukepighetti","followers_url":"https://api.github.com/users/lukepighetti/followers","following_url":"https://api.github.com/users/lukepighetti/following{/other_user}","gists_url":"https://api.github.com/users/lukepighetti/gists{/gist_id}","starred_url":"https://api.github.com/users/lukepighetti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukepighetti/subscriptions","organizations_url":"https://api.github.com/users/lukepighetti/orgs","repos_url":"https://api.github.com/users/lukepighetti/repos","events_url":"https://api.github.com/users/lukepighetti/events{/privacy}","received_events_url":"https://api.github.com/users/lukepighetti/received_events","type":"User","site_admin":false},"labels":[{"id":863761122,"node_id":"MDU6TGFiZWw4NjM3NjExMjI=","url":"https://api.github.com/repos/flutter/flutter/labels/d:%20stackoverflow","name":"d: stackoverflow","color":"0e8a16","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-07-11T16:24:50Z","updated_at":"2018-07-12T22:13:16Z","closed_at":null,"author_association":"NONE","body":"Dart 2 shorthand makes writing functional widgets super nice, especially for a React/Javascript heathen like myself.\r\n\r\nWhy should I ever use Stateless Widgets?\r\n\r\n<img width=\"610\" alt=\"screen shot 2018-07-11 at 12 24 06 pm\" src=\"https://user-images.githubusercontent.com/666539/42586140-6604f2c4-8505-11e8-9389-3d0db7bd80a7.png\">\r\n"},"comment":{"url":"https://api.github.com/repos/flutter/flutter/issues/comments/404667287","html_url":"https://github.com/flutter/flutter/issues/19269#issuecomment-404667287","issue_url":"https://api.github.com/repos/flutter/flutter/issues/19269","id":404667287,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNDY2NzI4Nw==","user":{"login":"xster","id":156888,"node_id":"MDQ6VXNlcjE1Njg4OA==","avatar_url":"https://avatars2.githubusercontent.com/u/156888?v=4","gravatar_id":"","url":"https://api.github.com/users/xster","html_url":"https://github.com/xster","followers_url":"https://api.github.com/users/xster/followers","following_url":"https://api.github.com/users/xster/following{/other_user}","gists_url":"https://api.github.com/users/xster/gists{/gist_id}","starred_url":"https://api.github.com/users/xster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xster/subscriptions","organizations_url":"https://api.github.com/users/xster/orgs","repos_url":"https://api.github.com/users/xster/repos","events_url":"https://api.github.com/users/xster/events{/privacy}","received_events_url":"https://api.github.com/users/xster/received_events","type":"User","site_admin":false},"created_at":"2018-07-12T22:13:16Z","updated_at":"2018-07-12T22:13:16Z","author_association":"CONTRIBUTOR","body":"Ya, the main difference is in how it links to the Element tree (in that functions don't get linked themselves and won't get triggered to rebuild themselves via the Element tree). \r\n\r\nSome other examples:\r\n\r\n- If your subtree depends on an InheritedWidget, a StatelessWidget will get surgically be marked to rebuild itself. If you used a function, the widget that gave the function its BuildContext will get rebuilt.\r\n- A function itself won't get called to rebuild during hot reload. Someone else will have to bring it along. If you just passed a function into `runApp` at the root of your application, nothing will be rebuilt during hot reload. "}}
{"actor":{"display_login":"xster"}}