{"action":"created","comment":{"url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/pulls/comments/213832617","pull_request_review_id":150752723,"id":213832617,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMzgzMjYxNw==","diff_hunk":"@@ -57,10 +57,202 @@\n # Parlons un peu de React\n \n ---\n-# Fontionnement de React\n-## en quelques mots\n+# Un composant React simple\n \n+Une classe qui étend `Component`:\n \n+```javascript\n+class Application extends React.Component {\n+  render() {\n+    return <div>{this.props.content}</div>;\n+  }\n+}\n+```\n+\n+---\n+# Un composant React simple\n+## Style *stateless* ou *fonctionnel*\n+\n+Une fonction qui prend un objet en paramètre et retourne un JSX:\n+\n+```js\n+function Application(props) {\n+  return <div>{props.content}</div>;\n+}\n+```\n+\n+Contrairement à une croyance répandue, **ce n'est pas** particulièrement optimisé\n+par React et c'est exactement équivalent au style précédent.\n+\n+---\n+# Comment React fait le rendu\n+## Premier rendu\n+\n+Il n'y a qu'une seule manière de déclencher un premier rendu: appeler\n+`ReactDOM.render`:\n+\n+```js\n+ReactDOM.render(\n+  <Application content='Hello World!'/>,\n+  document.getElementById('root')\n+);\n+```\n+\n+React appelle la méthode `render` de cet élément, puis continue récursivement\n+avec tous les enfants.\n+\n+---\n+# Comment React fait le rendu\n+## Updates suivantes\n+\n+Une update peut être déclenchée par:\n+1. un nouvel appel à `ReactDOM.render` avec le même composant\n+2. le `state` d'un composant change avec la méthode `setState`. C'est aussi ainsi\n+que les composants connectés à Redux sont mis à jour.\n+3. les `props` d'un composant changent. Cela est forcément une conséquence des\n+deux premiers cas.\n+\n+---\n+# Comment React fait le rendu\n+## Algorithme de réconciliation\n+\n+Lorsqu'il y a une update, React va appeler `render` de manière récursive sur\n+l'arbre obtenu depuis l'objet mis à jour.\n+\n+Lorsque l'élément est le même, React ne va que changer ses props si besoin et\n+réaliser une *update* l'instance existante.","path":"index.html","position":69,"original_position":69,"commit_id":"d9319738cc0599d334c946a5a03fa1d2b23cac4b","original_commit_id":"d9319738cc0599d334c946a5a03fa1d2b23cac4b","user":{"login":"ziir","id":2394128,"node_id":"MDQ6VXNlcjIzOTQxMjg=","avatar_url":"https://avatars2.githubusercontent.com/u/2394128?v=4","gravatar_id":"","url":"https://api.github.com/users/ziir","html_url":"https://github.com/ziir","followers_url":"https://api.github.com/users/ziir/followers","following_url":"https://api.github.com/users/ziir/following{/other_user}","gists_url":"https://api.github.com/users/ziir/gists{/gist_id}","starred_url":"https://api.github.com/users/ziir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ziir/subscriptions","organizations_url":"https://api.github.com/users/ziir/orgs","repos_url":"https://api.github.com/users/ziir/repos","events_url":"https://api.github.com/users/ziir/events{/privacy}","received_events_url":"https://api.github.com/users/ziir/received_events","type":"User","site_admin":false},"body":"de l'instance existance*","created_at":"2018-08-29T21:00:30Z","updated_at":"2018-08-29T21:00:30Z","html_url":"https://github.com/julienw/presentation-react-perf-gandi-2018/pull/1#discussion_r213832617","pull_request_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/pulls/1","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/pulls/comments/213832617"},"html":{"href":"https://github.com/julienw/presentation-react-perf-gandi-2018/pull/1#discussion_r213832617"},"pull_request":{"href":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/pulls/1","id":211828335,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExODI4MzM1","html_url":"https://github.com/julienw/presentation-react-perf-gandi-2018/pull/1","diff_url":"https://github.com/julienw/presentation-react-perf-gandi-2018/pull/1.diff","patch_url":"https://github.com/julienw/presentation-react-perf-gandi-2018/pull/1.patch","issue_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/issues/1","number":1,"state":"open","locked":false,"title":"React part 1","user":{"login":"julienw","id":454175,"node_id":"MDQ6VXNlcjQ1NDE3NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/454175?v=4","gravatar_id":"","url":"https://api.github.com/users/julienw","html_url":"https://github.com/julienw","followers_url":"https://api.github.com/users/julienw/followers","following_url":"https://api.github.com/users/julienw/following{/other_user}","gists_url":"https://api.github.com/users/julienw/gists{/gist_id}","starred_url":"https://api.github.com/users/julienw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julienw/subscriptions","organizations_url":"https://api.github.com/users/julienw/orgs","repos_url":"https://api.github.com/users/julienw/repos","events_url":"https://api.github.com/users/julienw/events{/privacy}","received_events_url":"https://api.github.com/users/julienw/received_events","type":"User","site_admin":false},"body":"@ziir si tu veux relire :)\r\nil reste à parler de comment marche l'immutabilité, et probablement simplifier des slides car j'ai écrit beaucoup de texte","created_at":"2018-08-29T17:21:09Z","updated_at":"2018-08-29T21:00:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"15ff3c83adef8454018421f4f82d782af515f7aa","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/pulls/1/commits","review_comments_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/pulls/1/comments","review_comment_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/pulls/comments{/number}","comments_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/issues/1/comments","statuses_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/statuses/d9319738cc0599d334c946a5a03fa1d2b23cac4b","head":{"label":"julienw:react-part-1","ref":"react-part-1","sha":"d9319738cc0599d334c946a5a03fa1d2b23cac4b","user":{"login":"julienw","id":454175,"node_id":"MDQ6VXNlcjQ1NDE3NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/454175?v=4","gravatar_id":"","url":"https://api.github.com/users/julienw","html_url":"https://github.com/julienw","followers_url":"https://api.github.com/users/julienw/followers","following_url":"https://api.github.com/users/julienw/following{/other_user}","gists_url":"https://api.github.com/users/julienw/gists{/gist_id}","starred_url":"https://api.github.com/users/julienw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julienw/subscriptions","organizations_url":"https://api.github.com/users/julienw/orgs","repos_url":"https://api.github.com/users/julienw/repos","events_url":"https://api.github.com/users/julienw/events{/privacy}","received_events_url":"https://api.github.com/users/julienw/received_events","type":"User","site_admin":false},"repo":{"id":146351180,"node_id":"MDEwOlJlcG9zaXRvcnkxNDYzNTExODA=","name":"presentation-react-perf-gandi-2018","full_name":"julienw/presentation-react-perf-gandi-2018","owner":{"login":"julienw","id":454175,"node_id":"MDQ6VXNlcjQ1NDE3NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/454175?v=4","gravatar_id":"","url":"https://api.github.com/users/julienw","html_url":"https://github.com/julienw","followers_url":"https://api.github.com/users/julienw/followers","following_url":"https://api.github.com/users/julienw/following{/other_user}","gists_url":"https://api.github.com/users/julienw/gists{/gist_id}","starred_url":"https://api.github.com/users/julienw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julienw/subscriptions","organizations_url":"https://api.github.com/users/julienw/orgs","repos_url":"https://api.github.com/users/julienw/repos","events_url":"https://api.github.com/users/julienw/events{/privacy}","received_events_url":"https://api.github.com/users/julienw/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/julienw/presentation-react-perf-gandi-2018","description":null,"fork":false,"url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018","forks_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/forks","keys_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/keys{/key_id}","collaborators_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/teams","hooks_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/hooks","issue_events_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/issues/events{/number}","events_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/events","assignees_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/assignees{/user}","branches_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/branches{/branch}","tags_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/tags","blobs_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/git/refs{/sha}","trees_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/git/trees{/sha}","statuses_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/statuses/{sha}","languages_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/languages","stargazers_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/stargazers","contributors_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/contributors","subscribers_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/subscribers","subscription_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/subscription","commits_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/commits{/sha}","git_commits_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/git/commits{/sha}","comments_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/comments{/number}","issue_comment_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/issues/comments{/number}","contents_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/contents/{+path}","compare_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/compare/{base}...{head}","merges_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/merges","archive_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/downloads","issues_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/issues{/number}","pulls_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/pulls{/number}","milestones_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/milestones{/number}","notifications_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/labels{/name}","releases_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/releases{/id}","deployments_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/deployments","created_at":"2018-08-27T20:37:24Z","updated_at":"2018-08-29T17:19:29Z","pushed_at":"2018-08-29T17:21:09Z","git_url":"git://github.com/julienw/presentation-react-perf-gandi-2018.git","ssh_url":"git@github.com:julienw/presentation-react-perf-gandi-2018.git","clone_url":"https://github.com/julienw/presentation-react-perf-gandi-2018.git","svn_url":"https://github.com/julienw/presentation-react-perf-gandi-2018","homepage":"https://julienw.github.io/presentation-react-perf-gandi-2018/index.html","size":4917,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"julienw:master","ref":"master","sha":"41e223d35b67d42a1671c8d327ac45e7caa8f200","user":{"login":"julienw","id":454175,"node_id":"MDQ6VXNlcjQ1NDE3NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/454175?v=4","gravatar_id":"","url":"https://api.github.com/users/julienw","html_url":"https://github.com/julienw","followers_url":"https://api.github.com/users/julienw/followers","following_url":"https://api.github.com/users/julienw/following{/other_user}","gists_url":"https://api.github.com/users/julienw/gists{/gist_id}","starred_url":"https://api.github.com/users/julienw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julienw/subscriptions","organizations_url":"https://api.github.com/users/julienw/orgs","repos_url":"https://api.github.com/users/julienw/repos","events_url":"https://api.github.com/users/julienw/events{/privacy}","received_events_url":"https://api.github.com/users/julienw/received_events","type":"User","site_admin":false},"repo":{"id":146351180,"node_id":"MDEwOlJlcG9zaXRvcnkxNDYzNTExODA=","name":"presentation-react-perf-gandi-2018","full_name":"julienw/presentation-react-perf-gandi-2018","owner":{"login":"julienw","id":454175,"node_id":"MDQ6VXNlcjQ1NDE3NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/454175?v=4","gravatar_id":"","url":"https://api.github.com/users/julienw","html_url":"https://github.com/julienw","followers_url":"https://api.github.com/users/julienw/followers","following_url":"https://api.github.com/users/julienw/following{/other_user}","gists_url":"https://api.github.com/users/julienw/gists{/gist_id}","starred_url":"https://api.github.com/users/julienw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julienw/subscriptions","organizations_url":"https://api.github.com/users/julienw/orgs","repos_url":"https://api.github.com/users/julienw/repos","events_url":"https://api.github.com/users/julienw/events{/privacy}","received_events_url":"https://api.github.com/users/julienw/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/julienw/presentation-react-perf-gandi-2018","description":null,"fork":false,"url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018","forks_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/forks","keys_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/keys{/key_id}","collaborators_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/teams","hooks_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/hooks","issue_events_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/issues/events{/number}","events_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/events","assignees_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/assignees{/user}","branches_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/branches{/branch}","tags_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/tags","blobs_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/git/refs{/sha}","trees_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/git/trees{/sha}","statuses_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/statuses/{sha}","languages_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/languages","stargazers_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/stargazers","contributors_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/contributors","subscribers_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/subscribers","subscription_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/subscription","commits_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/commits{/sha}","git_commits_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/git/commits{/sha}","comments_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/comments{/number}","issue_comment_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/issues/comments{/number}","contents_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/contents/{+path}","compare_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/compare/{base}...{head}","merges_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/merges","archive_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/downloads","issues_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/issues{/number}","pulls_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/pulls{/number}","milestones_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/milestones{/number}","notifications_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/labels{/name}","releases_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/releases{/id}","deployments_url":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/deployments","created_at":"2018-08-27T20:37:24Z","updated_at":"2018-08-29T17:19:29Z","pushed_at":"2018-08-29T17:21:09Z","git_url":"git://github.com/julienw/presentation-react-perf-gandi-2018.git","ssh_url":"git@github.com:julienw/presentation-react-perf-gandi-2018.git","clone_url":"https://github.com/julienw/presentation-react-perf-gandi-2018.git","svn_url":"https://github.com/julienw/presentation-react-perf-gandi-2018","homepage":"https://julienw.github.io/presentation-react-perf-gandi-2018/index.html","size":4917,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/pulls/1"},"html":{"href":"https://github.com/julienw/presentation-react-perf-gandi-2018/pull/1"},"issue":{"href":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/issues/1"},"comments":{"href":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/julienw/presentation-react-perf-gandi-2018/statuses/d9319738cc0599d334c946a5a03fa1d2b23cac4b"}},"author_association":"OWNER"}}
{"actor":{"display_login":"ziir"}}