{"action":"created","comment":{"url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/pulls/comments/125823880","pull_request_review_id":48248462,"id":125823880,"diff_hunk":"@@ -0,0 +1,3 @@\n+// Aliasing Object.assign allows the minifier to shorten `Object.assign` to a single character variable.\n+// Shortens 13 bytes to 1 at the cost of another allocation.\n+export default Object.assign","path":"lib/utils/assign.js","position":3,"original_position":3,"commit_id":"dc07ea488ca2d096d49974d238bedc235ec0836d","original_commit_id":"dc07ea488ca2d096d49974d238bedc235ec0836d","user":{"login":"alexsasharegan","id":16269252,"avatar_url":"https://avatars1.githubusercontent.com/u/16269252?v=3","gravatar_id":"","url":"https://api.github.com/users/alexsasharegan","html_url":"https://github.com/alexsasharegan","followers_url":"https://api.github.com/users/alexsasharegan/followers","following_url":"https://api.github.com/users/alexsasharegan/following{/other_user}","gists_url":"https://api.github.com/users/alexsasharegan/gists{/gist_id}","starred_url":"https://api.github.com/users/alexsasharegan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexsasharegan/subscriptions","organizations_url":"https://api.github.com/users/alexsasharegan/orgs","repos_url":"https://api.github.com/users/alexsasharegan/repos","events_url":"https://api.github.com/users/alexsasharegan/events{/privacy}","received_events_url":"https://api.github.com/users/alexsasharegan/received_events","type":"User","site_admin":false},"body":"I kinda thought this affords that opportunity. I also just got tired of so many `Object.assign`'s.","created_at":"2017-07-06T06:57:59Z","updated_at":"2017-07-06T06:57:59Z","html_url":"https://github.com/bootstrap-vue/bootstrap-vue/pull/646#discussion_r125823880","pull_request_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/pulls/646","_links":{"self":{"href":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/pulls/comments/125823880"},"html":{"href":"https://github.com/bootstrap-vue/bootstrap-vue/pull/646#discussion_r125823880"},"pull_request":{"href":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/pulls/646"}}},"pull_request":{"url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/pulls/646","id":128976083,"html_url":"https://github.com/bootstrap-vue/bootstrap-vue/pull/646","diff_url":"https://github.com/bootstrap-vue/bootstrap-vue/pull/646.diff","patch_url":"https://github.com/bootstrap-vue/bootstrap-vue/pull/646.patch","issue_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/issues/646","number":646,"state":"open","locked":false,"title":"[WIP] perf: switch stateless components to functional components","user":{"login":"alexsasharegan","id":16269252,"avatar_url":"https://avatars1.githubusercontent.com/u/16269252?v=3","gravatar_id":"","url":"https://api.github.com/users/alexsasharegan","html_url":"https://github.com/alexsasharegan","followers_url":"https://api.github.com/users/alexsasharegan/followers","following_url":"https://api.github.com/users/alexsasharegan/following{/other_user}","gists_url":"https://api.github.com/users/alexsasharegan/gists{/gist_id}","starred_url":"https://api.github.com/users/alexsasharegan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexsasharegan/subscriptions","organizations_url":"https://api.github.com/users/alexsasharegan/orgs","repos_url":"https://api.github.com/users/alexsasharegan/repos","events_url":"https://api.github.com/users/alexsasharegan/events{/privacy}","received_events_url":"https://api.github.com/users/alexsasharegan/received_events","type":"User","site_admin":false},"body":"Rather than work on this _\"in secret\"_, I figured I could open a WIP PR so everyone can weigh in on/get familiar with a refactor to functional components for several stateless components. There are some key differences from single file `.vue` components that I'm still learning about, but the main info can be found here: https://vuejs.org/v2/guide/render-function.html#Functional-Components.\r\n\r\n## Benefits\r\nFunctional Components (**FC**'s) are stateless (no `$data`) and instanceless (no `this`). As such, they incur no cost of observation, no time spent on component initialization, and consume less memory at runtime. \r\n\r\nThey have slightly different render behavior than you may be accustomed to. FC's render _\"eagerly\"_ in that the are called again every time their parent re-renders. Virtual dom diffing optimizations may still be made, but there is currently no Vue mechanism in place to memoize the return of a FC and avoid calling the function with the same input twice. As a FC should be a pure function, it should theoretically be possible to memoize output, but FC's should be _\"cheap enough\"_ to render that the net perf improves regardless of memoization.\r\n\r\n## Possible Gotchas\r\n- No `data` (FC's are stateless)\r\n- No `this` (FC's don't get instantiated, they are simply called as functions and rendered. They hold no instance memory)\r\n  - Not able to emit Vue events because cannot because not a vue instance (still can listen and register callbacks on both vue and native events)\r\n- Pure functions (cannot/should not create any side-effects)\r\n- If the root of a FC is an HTML element, the vnode will not be a `vm`, but rather a simple element.\r\n  - This means no `vm.$el`, just `el`\r\n  - No need for `v-on:event.native` when root of FC is `HTMLElement`\r\n- Prop and attribute merging is largely the burden of the component (especially depending on how many props the component overrides vs. merges)\r\n- Not restricted to a single root node. Can return an array of vnodes at root level.\r\n\r\n## Release\r\nI say this could be a v1.0.0 release goal. I would technically place this under a breaking change because switching to FC's will change how the nodes are referenced and event handlers are attached.\r\n\r\n## Component Todo List\r\nA running list of BV UI components to refactor to FC's. Feel free to add to list!\r\n\r\n- [x] `b-link`\r\n- [x] `b-form`\r\n- [ ] `b-nav-form`\r\n- [ ] `b-button`\r\n- [ ] `b-dropdown-divider`\r\n- [ ] `b-dropdown-header`","created_at":"2017-07-05T14:25:53Z","updated_at":"2017-07-06T06:57:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d1653619c95d034858fbf52684bfb7f2be88c70b","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":{"url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/milestones/2","html_url":"https://github.com/bootstrap-vue/bootstrap-vue/milestone/2","labels_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/milestones/2/labels","id":2588873,"number":2,"title":"v1.0.0","description":"Alignment with Bootstrap V4 Beta 1","creator":{"login":"tmorehouse","id":2781561,"avatar_url":"https://avatars0.githubusercontent.com/u/2781561?v=3","gravatar_id":"","url":"https://api.github.com/users/tmorehouse","html_url":"https://github.com/tmorehouse","followers_url":"https://api.github.com/users/tmorehouse/followers","following_url":"https://api.github.com/users/tmorehouse/following{/other_user}","gists_url":"https://api.github.com/users/tmorehouse/gists{/gist_id}","starred_url":"https://api.github.com/users/tmorehouse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmorehouse/subscriptions","organizations_url":"https://api.github.com/users/tmorehouse/orgs","repos_url":"https://api.github.com/users/tmorehouse/repos","events_url":"https://api.github.com/users/tmorehouse/events{/privacy}","received_events_url":"https://api.github.com/users/tmorehouse/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":2,"state":"open","created_at":"2017-06-17T18:55:29Z","updated_at":"2017-07-05T23:51:56Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/pulls/646/commits","review_comments_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/pulls/646/comments","review_comment_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/issues/646/comments","statuses_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/statuses/dc07ea488ca2d096d49974d238bedc235ec0836d","head":{"label":"alexsasharegan:feat/functional-components","ref":"feat/functional-components","sha":"dc07ea488ca2d096d49974d238bedc235ec0836d","user":{"login":"alexsasharegan","id":16269252,"avatar_url":"https://avatars1.githubusercontent.com/u/16269252?v=3","gravatar_id":"","url":"https://api.github.com/users/alexsasharegan","html_url":"https://github.com/alexsasharegan","followers_url":"https://api.github.com/users/alexsasharegan/followers","following_url":"https://api.github.com/users/alexsasharegan/following{/other_user}","gists_url":"https://api.github.com/users/alexsasharegan/gists{/gist_id}","starred_url":"https://api.github.com/users/alexsasharegan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexsasharegan/subscriptions","organizations_url":"https://api.github.com/users/alexsasharegan/orgs","repos_url":"https://api.github.com/users/alexsasharegan/repos","events_url":"https://api.github.com/users/alexsasharegan/events{/privacy}","received_events_url":"https://api.github.com/users/alexsasharegan/received_events","type":"User","site_admin":false},"repo":{"id":89757582,"name":"bootstrap-vue","full_name":"alexsasharegan/bootstrap-vue","owner":{"login":"alexsasharegan","id":16269252,"avatar_url":"https://avatars1.githubusercontent.com/u/16269252?v=3","gravatar_id":"","url":"https://api.github.com/users/alexsasharegan","html_url":"https://github.com/alexsasharegan","followers_url":"https://api.github.com/users/alexsasharegan/followers","following_url":"https://api.github.com/users/alexsasharegan/following{/other_user}","gists_url":"https://api.github.com/users/alexsasharegan/gists{/gist_id}","starred_url":"https://api.github.com/users/alexsasharegan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexsasharegan/subscriptions","organizations_url":"https://api.github.com/users/alexsasharegan/orgs","repos_url":"https://api.github.com/users/alexsasharegan/repos","events_url":"https://api.github.com/users/alexsasharegan/events{/privacy}","received_events_url":"https://api.github.com/users/alexsasharegan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alexsasharegan/bootstrap-vue","description":"Bootstrap 4 components for Vue.js 2","fork":true,"url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue","forks_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/forks","keys_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/teams","hooks_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/hooks","issue_events_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/issues/events{/number}","events_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/events","assignees_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/assignees{/user}","branches_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/branches{/branch}","tags_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/tags","blobs_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/git/refs{/sha}","trees_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/statuses/{sha}","languages_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/languages","stargazers_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/stargazers","contributors_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/contributors","subscribers_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/subscribers","subscription_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/subscription","commits_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/commits{/sha}","git_commits_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/git/commits{/sha}","comments_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/comments{/number}","issue_comment_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/issues/comments{/number}","contents_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/contents/{+path}","compare_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/merges","archive_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/downloads","issues_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/issues{/number}","pulls_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/pulls{/number}","milestones_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/milestones{/number}","notifications_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/labels{/name}","releases_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/releases{/id}","deployments_url":"https://api.github.com/repos/alexsasharegan/bootstrap-vue/deployments","created_at":"2017-04-29T01:58:39Z","updated_at":"2017-04-29T01:58:41Z","pushed_at":"2017-07-05T14:46:04Z","git_url":"git://github.com/alexsasharegan/bootstrap-vue.git","ssh_url":"git@github.com:alexsasharegan/bootstrap-vue.git","clone_url":"https://github.com/alexsasharegan/bootstrap-vue.git","svn_url":"https://github.com/alexsasharegan/bootstrap-vue","homepage":"https://bootstrap-vue.github.io","size":2213,"stargazers_count":0,"watchers_count":0,"language":"Vue","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bootstrap-vue:master","ref":"master","sha":"836db334861846006a7d0cbf1498dc0e14d5be42","user":{"login":"bootstrap-vue","id":22965283,"avatar_url":"https://avatars1.githubusercontent.com/u/22965283?v=3","gravatar_id":"","url":"https://api.github.com/users/bootstrap-vue","html_url":"https://github.com/bootstrap-vue","followers_url":"https://api.github.com/users/bootstrap-vue/followers","following_url":"https://api.github.com/users/bootstrap-vue/following{/other_user}","gists_url":"https://api.github.com/users/bootstrap-vue/gists{/gist_id}","starred_url":"https://api.github.com/users/bootstrap-vue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bootstrap-vue/subscriptions","organizations_url":"https://api.github.com/users/bootstrap-vue/orgs","repos_url":"https://api.github.com/users/bootstrap-vue/repos","events_url":"https://api.github.com/users/bootstrap-vue/events{/privacy}","received_events_url":"https://api.github.com/users/bootstrap-vue/received_events","type":"Organization","site_admin":false},"repo":{"id":70342215,"name":"bootstrap-vue","full_name":"bootstrap-vue/bootstrap-vue","owner":{"login":"bootstrap-vue","id":22965283,"avatar_url":"https://avatars1.githubusercontent.com/u/22965283?v=3","gravatar_id":"","url":"https://api.github.com/users/bootstrap-vue","html_url":"https://github.com/bootstrap-vue","followers_url":"https://api.github.com/users/bootstrap-vue/followers","following_url":"https://api.github.com/users/bootstrap-vue/following{/other_user}","gists_url":"https://api.github.com/users/bootstrap-vue/gists{/gist_id}","starred_url":"https://api.github.com/users/bootstrap-vue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bootstrap-vue/subscriptions","organizations_url":"https://api.github.com/users/bootstrap-vue/orgs","repos_url":"https://api.github.com/users/bootstrap-vue/repos","events_url":"https://api.github.com/users/bootstrap-vue/events{/privacy}","received_events_url":"https://api.github.com/users/bootstrap-vue/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bootstrap-vue/bootstrap-vue","description":"Bootstrap 4 components for Vue.js 2","fork":false,"url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue","forks_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/forks","keys_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/teams","hooks_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/hooks","issue_events_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/issues/events{/number}","events_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/events","assignees_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/assignees{/user}","branches_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/branches{/branch}","tags_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/tags","blobs_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/git/refs{/sha}","trees_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/statuses/{sha}","languages_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/languages","stargazers_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/stargazers","contributors_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/contributors","subscribers_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/subscribers","subscription_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/subscription","commits_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/commits{/sha}","git_commits_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/git/commits{/sha}","comments_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/comments{/number}","issue_comment_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/issues/comments{/number}","contents_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/contents/{+path}","compare_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/merges","archive_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/downloads","issues_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/issues{/number}","pulls_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/pulls{/number}","milestones_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/milestones{/number}","notifications_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/labels{/name}","releases_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/releases{/id}","deployments_url":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/deployments","created_at":"2016-10-08T15:59:35Z","updated_at":"2017-07-06T03:48:13Z","pushed_at":"2017-07-06T05:43:58Z","git_url":"git://github.com/bootstrap-vue/bootstrap-vue.git","ssh_url":"git@github.com:bootstrap-vue/bootstrap-vue.git","clone_url":"https://github.com/bootstrap-vue/bootstrap-vue.git","svn_url":"https://github.com/bootstrap-vue/bootstrap-vue","homepage":"https://bootstrap-vue.js.org","size":2194,"stargazers_count":1428,"watchers_count":1428,"language":"Vue","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":279,"mirror_url":null,"open_issues_count":43,"forks":279,"open_issues":43,"watchers":1428,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/pulls/646"},"html":{"href":"https://github.com/bootstrap-vue/bootstrap-vue/pull/646"},"issue":{"href":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/issues/646"},"comments":{"href":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/issues/646/comments"},"review_comments":{"href":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/pulls/646/comments"},"review_comment":{"href":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/pulls/646/commits"},"statuses":{"href":"https://api.github.com/repos/bootstrap-vue/bootstrap-vue/statuses/dc07ea488ca2d096d49974d238bedc235ec0836d"}}}}
{"actor":{"display_login":"alexsasharegan"}}