Created
October 5, 2021 14:48
-
-
Save fouad1998/a6bcd9b7a83fced577f85e28b863e129 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"type": 4.0, | |
"data": { | |
"href": "https://stackoverflow.com/questions/54824036/useeffect-hook-with-socket-io-state-is-not-persistent-in-socket-handlers", | |
"width": 982.0, | |
"height": 624.0 | |
}, | |
"timestamp": 1.633131320829e12 | |
}, | |
{ | |
"data": { "source": 1.0, "positions": [{ "timeOffset": 0.0, "x": 85.0, "y": 164.0, "id": 4912.0 }] }, | |
"timestamp": 1.633131321152e12, | |
"type": 3.0 | |
}, | |
{ | |
"type": 2.0, | |
"data": { | |
"initialOffset": { "left": 0.0, "top": 0.0 }, | |
"node": { | |
"type": 0.0, | |
"childNodes": [ | |
{ "publicId": "", "systemId": "", "id": 2.0, "type": 1.0, "name": "html" }, | |
{ | |
"type": 2.0, | |
"tagName": "html", | |
"attributes": { "itemscope": "", "itemtype": "https://schema.org/QAPage", "class": "html__responsive " }, | |
"childNodes": [ | |
{ | |
"tagName": "head", | |
"attributes": {}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n\n ", "id": 5.0 }, | |
{ | |
"id": 6.0, | |
"type": 2.0, | |
"tagName": "title", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "reactjs - UseEffect hook with socket.io state is not persistent in socket handlers - Stack Overflow", | |
"id": 7.0 | |
} | |
] | |
}, | |
{ "textContent": "\n ", "id": 8.0, "type": 3.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "link", | |
"attributes": { | |
"href": "https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico?v=ec617d715196", | |
"rel": "shortcut icon" | |
}, | |
"childNodes": [], | |
"id": 9.0 | |
}, | |
{ "textContent": "\n ", "id": 10.0, "type": 3.0 }, | |
{ | |
"childNodes": [], | |
"id": 11.0, | |
"type": 2.0, | |
"tagName": "link", | |
"attributes": { | |
"rel": "apple-touch-icon", | |
"href": "https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a" | |
} | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 12.0 }, | |
{ | |
"id": 13.0, | |
"type": 2.0, | |
"tagName": "link", | |
"attributes": { | |
"rel": "image_src", | |
"href": "https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a" | |
}, | |
"childNodes": [] | |
}, | |
{ "type": 3.0, "textContent": " \n ", "id": 14.0 }, | |
{ | |
"attributes": { | |
"rel": "search", | |
"type": "application/opensearchdescription+xml", | |
"title": "Stack Overflow", | |
"href": "https://stackoverflow.com/opensearch.xml" | |
}, | |
"childNodes": [], | |
"id": 15.0, | |
"type": 2.0, | |
"tagName": "link" | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 16.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "link", | |
"attributes": { | |
"rel": "canonical", | |
"href": "https://stackoverflow.com/questions/54824036/useeffect-hook-with-socket-io-state-is-not-persistent-in-socket-handlers" | |
}, | |
"childNodes": [], | |
"id": 17.0 | |
}, | |
{ "id": 18.0, "type": 3.0, "textContent": "\n " }, | |
{ | |
"type": 2.0, | |
"tagName": "meta", | |
"attributes": { | |
"name": "viewport", | |
"content": "width=device-width, height=device-height, initial-scale=1.0, minimum-scale=1.0" | |
}, | |
"childNodes": [], | |
"id": 19.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 20.0 }, | |
{ | |
"attributes": { "property": "og:type", "content": "website" }, | |
"childNodes": [], | |
"id": 21.0, | |
"type": 2.0, | |
"tagName": "meta" | |
}, | |
{ "textContent": "\n ", "id": 22.0, "type": 3.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "meta", | |
"attributes": { | |
"property": "og:url", | |
"content": "https://stackoverflow.com/questions/54824036/useeffect-hook-with-socket-io-state-is-not-persistent-in-socket-handlers" | |
}, | |
"childNodes": [], | |
"id": 23.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 24.0 }, | |
{ | |
"childNodes": [], | |
"id": 25.0, | |
"type": 2.0, | |
"tagName": "meta", | |
"attributes": { "property": "og:site_name", "content": "Stack Overflow" } | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 26.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "meta", | |
"attributes": { | |
"property": "og:image", | |
"itemprop": "image primaryImageOfPage", | |
"content": "https://cdn.sstatic.net/Sites/stackoverflow/Img/[email protected]?v=73d79a89bded" | |
}, | |
"childNodes": [], | |
"id": 27.0 | |
}, | |
{ "textContent": "\n ", "id": 28.0, "type": 3.0 }, | |
{ | |
"attributes": { "name": "twitter:card", "content": "summary" }, | |
"childNodes": [], | |
"id": 29.0, | |
"type": 2.0, | |
"tagName": "meta" | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 30.0 }, | |
{ | |
"childNodes": [], | |
"id": 31.0, | |
"type": 2.0, | |
"tagName": "meta", | |
"attributes": { "name": "twitter:domain", "content": "stackoverflow.com" } | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 32.0 }, | |
{ | |
"attributes": { | |
"content": "UseEffect hook with socket.io state is not persistent in socket handlers", | |
"name": "twitter:title", | |
"property": "og:title", | |
"itemprop": "name" | |
}, | |
"childNodes": [], | |
"id": 33.0, | |
"type": 2.0, | |
"tagName": "meta" | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 34.0 }, | |
{ | |
"tagName": "meta", | |
"attributes": { | |
"name": "twitter:description", | |
"property": "og:description", | |
"itemprop": "description", | |
"content": "I have the following react component\n\nfunction ConferencingRoom() {\n const [participants, setParticipants] = useState({})\n console.log('Participants -\u0026gt; ', participants)\n\n useEffect(() =..." | |
}, | |
"childNodes": [], | |
"id": 35.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": "\n\n ", "id": 36.0 }, | |
{ | |
"id": 37.0, | |
"type": 2.0, | |
"tagName": "script", | |
"attributes": { "src": "https://sb.scorecardresearch.com/cs/17440561/beacon.js", "async": "" }, | |
"childNodes": [] | |
}, | |
{ | |
"tagName": "script", | |
"attributes": { "async": "", "src": "https://www.google-analytics.com/analytics.js" }, | |
"childNodes": [], | |
"id": 38.0, | |
"type": 2.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "script", | |
"attributes": { "src": "https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js" }, | |
"childNodes": [], | |
"id": 39.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 40.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "script", | |
"attributes": { "src": "https://cdn.sstatic.net/Js/stub.en.js?v=ed60ecb24785" }, | |
"childNodes": [], | |
"id": 41.0 | |
}, | |
{ "type": 3.0, "textContent": "\n \n ", "id": 42.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "link", | |
"attributes": { | |
"rel": "stylesheet", | |
"type": "text/css", | |
"href": "https://cdn.sstatic.net/Shared/stacks.css?v=47f2e10eb087" | |
}, | |
"childNodes": [], | |
"id": 43.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 44.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "link", | |
"attributes": { | |
"href": "https://cdn.sstatic.net/Sites/stackoverflow/primary.css?v=e412ac10da91", | |
"rel": "stylesheet", | |
"type": "text/css" | |
}, | |
"childNodes": [], | |
"id": 45.0 | |
}, | |
{ "type": 3.0, "textContent": "\n\n \n ", "id": 46.0 }, | |
{ | |
"attributes": { | |
"rel": "alternate", | |
"type": "application/atom+xml", | |
"title": "Feed for question 'UseEffect hook with socket.io state is not persistent in socket handlers'", | |
"href": "https://stackoverflow.com/feeds/question/54824036" | |
}, | |
"childNodes": [], | |
"id": 47.0, | |
"type": 2.0, | |
"tagName": "link" | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 48.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "meta", | |
"attributes": { "name": "twitter:app:country", "content": "US" }, | |
"childNodes": [], | |
"id": 49.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 50.0 }, | |
{ | |
"id": 51.0, | |
"type": 2.0, | |
"tagName": "meta", | |
"attributes": { "name": "twitter:app:name:iphone", "content": "Stack Exchange iOS" }, | |
"childNodes": [] | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 52.0 }, | |
{ | |
"childNodes": [], | |
"id": 53.0, | |
"type": 2.0, | |
"tagName": "meta", | |
"attributes": { "name": "twitter:app:id:iphone", "content": "871299723" } | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 54.0 }, | |
{ | |
"id": 55.0, | |
"type": 2.0, | |
"tagName": "meta", | |
"attributes": { | |
"name": "twitter:app:url:iphone", | |
"content": "se-zaphod://stackoverflow.com/questions/54824036/useeffect-hook-with-socket-io-state-is-not-persistent-in-socket-handlers" | |
}, | |
"childNodes": [] | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 56.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "meta", | |
"attributes": { "name": "twitter:app:name:ipad", "content": "Stack Exchange iOS" }, | |
"childNodes": [], | |
"id": 57.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 58.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "meta", | |
"attributes": { "name": "twitter:app:id:ipad", "content": "871299723" }, | |
"childNodes": [], | |
"id": 59.0 | |
}, | |
{ "textContent": "\n ", "id": 60.0, "type": 3.0 }, | |
{ | |
"childNodes": [], | |
"id": 61.0, | |
"type": 2.0, | |
"tagName": "meta", | |
"attributes": { | |
"name": "twitter:app:url:ipad", | |
"content": "se-zaphod://stackoverflow.com/questions/54824036/useeffect-hook-with-socket-io-state-is-not-persistent-in-socket-handlers" | |
} | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 62.0 }, | |
{ | |
"childNodes": [], | |
"id": 63.0, | |
"type": 2.0, | |
"tagName": "meta", | |
"attributes": { "content": "Stack Exchange Android", "name": "twitter:app:name:googleplay" } | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 64.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "meta", | |
"attributes": { | |
"name": "twitter:app:url:googleplay", | |
"content": "https://stackoverflow.com/questions/54824036/useeffect-hook-with-socket-io-state-is-not-persistent-in-socket-handlers" | |
}, | |
"childNodes": [], | |
"id": 65.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 66.0 }, | |
{ | |
"childNodes": [], | |
"id": 67.0, | |
"type": 2.0, | |
"tagName": "meta", | |
"attributes": { "content": "com.stackexchange.marvin", "name": "twitter:app:id:googleplay" } | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 68.0 }, | |
{ | |
"childNodes": [{ "type": 3.0, "textContent": "SCRIPT_PLACEHOLDER", "id": 70.0 }], | |
"id": 69.0, | |
"type": 2.0, | |
"tagName": "script", | |
"attributes": {} | |
}, | |
{ "id": 71.0, "type": 3.0, "textContent": "\n\n \n \n \n " }, | |
{ | |
"childNodes": [], | |
"id": 72.0, | |
"type": 2.0, | |
"tagName": "link", | |
"attributes": { | |
"href": "https://cdn.sstatic.net/Shared/Channels/channels.css?v=47a5e0f03c81", | |
"rel": "stylesheet", | |
"type": "text/css" | |
} | |
}, | |
{ "id": 73.0, "type": 3.0, "textContent": "\n \n \n \n\n\n " }, | |
{ | |
"attributes": {}, | |
"childNodes": [{ "type": 3.0, "textContent": "SCRIPT_PLACEHOLDER", "id": 75.0 }], | |
"id": 74.0, | |
"type": 2.0, | |
"tagName": "script" | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 76.0 }, | |
{ | |
"tagName": "noscript", | |
"attributes": { "id": "noscript-css" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\u003cstyle\u003ebody,.top-bar{margin-top:1.9em}\u003c/style\u003e", | |
"id": 78.0 | |
} | |
], | |
"id": 77.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 79.0 }, | |
{ | |
"tagName": "meta", | |
"attributes": { | |
"http-equiv": "origin-trial", | |
"content": "A88otRz1Fd3Nt567e2IYshC18LL3KGVXpVJW9oTCId4RYaygt23pbb4JqrbdIO/bwZPWEmRjBIRBu/bZbDR7Pg4AAABueyJvcmlnaW4iOiJodHRwczovL2ltYXNkay5nb29nbGVhcGlzLmNvbTo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2MzQwODMxOTksImlzVGhpcmRQYXJ0eSI6dHJ1ZX0=" | |
}, | |
"childNodes": [], | |
"id": 80.0, | |
"type": 2.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "meta", | |
"attributes": { | |
"http-equiv": "origin-trial", | |
"content": "A0gCLbXCcL0R1Oc8tFPDs0G4Elz17w3zHp+Zst66+D17veE2o7fUcPsA114QtSTRqfVJLMeTSdeWOom0CcyCsgYAAAB7eyJvcmlnaW4iOiJodHRwczovL2RvdWJsZWNsaWNrLm5ldDo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2MzQwODMxOTksImlzU3ViZG9tYWluIjp0cnVlLCJpc1RoaXJkUGFydHkiOnRydWV9" | |
}, | |
"childNodes": [], | |
"id": 81.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "meta", | |
"attributes": { | |
"http-equiv": "origin-trial", | |
"content": "A9RQ+LxFazAousxUwSCzaihJjHLO1UyjQp0teZKHl7WdbVjPDfHSKMd6D/ZI5MTjqClFycbl70EFd7cBJWXqKQEAAACBeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXRhZ3NlcnZpY2VzLmNvbTo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2MzQwODMxOTksImlzU3ViZG9tYWluIjp0cnVlLCJpc1RoaXJkUGFydHkiOnRydWV9" | |
}, | |
"childNodes": [], | |
"id": 82.0 | |
}, | |
{ | |
"childNodes": [], | |
"id": 83.0, | |
"type": 2.0, | |
"tagName": "meta", | |
"attributes": { | |
"http-equiv": "origin-trial", | |
"content": "A6WKeWsdn1Ct+ZPqS9NCxxaiBoQ7wdTkK2/gE69Yu0gfBKJfo1gOvgkGmf5/xaIajT/RUb9AbnF1FsSZ47cCcQcAAACBeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXN5bmRpY2F0aW9uLmNvbTo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2MzQwODMxOTksImlzU3ViZG9tYWluIjp0cnVlLCJpc1RoaXJkUGFydHkiOnRydWV9" | |
} | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "meta", | |
"attributes": { | |
"content": "A04ZCu7yjrHgwQJK5ISHhH1DSg0qqowEay3n70KO6wV3D2Mj+OX3Kw20aSMitzgdG1xfrN7sOJV/dZIk+RvCzA4AAAB2eyJvcmlnaW4iOiJodHRwczovL2dvb2dsZS5jb206NDQzIiwiZmVhdHVyZSI6IlRydXN0VG9rZW5zIiwiZXhwaXJ5IjoxNjM0MDgzMTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlfQ==", | |
"http-equiv": "origin-trial" | |
}, | |
"childNodes": [], | |
"id": 84.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "meta", | |
"attributes": { | |
"http-equiv": "origin-trial", | |
"content": "A2YAd4xOntTGygIDjApOTtXOgVI3IWsd5OnOGq3RbRkIQwyqYWNl1JGRAcvtm6VOHDj4n07T/J19VqLuJn3MmQ8AAACWeyJvcmlnaW4iOiJodHRwczovL2RvdWJsZWNsaWNrLm5ldDo0NDMiLCJmZWF0dXJlIjoiQ29udmVyc2lvbk1lYXN1cmVtZW50IiwiZXhwaXJ5IjoxNjMxNjYzOTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlLCJ1c2FnZSI6InN1YnNldCJ9" | |
}, | |
"childNodes": [], | |
"id": 85.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "meta", | |
"attributes": { | |
"http-equiv": "origin-trial", | |
"content": "A2c5Ux+hivdkLh/KbZUGr6f7SCR0mZrBVfPJ+/OuDVHNwiYv+Lo83b9z5qL8sod78bQl0pSLtbvRWURo+xRl7AIAAACceyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXN5bmRpY2F0aW9uLmNvbTo0NDMiLCJmZWF0dXJlIjoiQ29udmVyc2lvbk1lYXN1cmVtZW50IiwiZXhwaXJ5IjoxNjMxNjYzOTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlLCJ1c2FnZSI6InN1YnNldCJ9" | |
}, | |
"childNodes": [], | |
"id": 86.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "meta", | |
"attributes": { | |
"http-equiv": "origin-trial", | |
"content": "AzNJ4sd3tVurolpdvWYZ4cmP9Po7RJhEHSqmC3pgxW9fFVZvchhtcMUgHAs97npxMD1jhXHO8s6q6Wy1MMLxKgEAAACceyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXRhZ3NlcnZpY2VzLmNvbTo0NDMiLCJmZWF0dXJlIjoiQ29udmVyc2lvbk1lYXN1cmVtZW50IiwiZXhwaXJ5IjoxNjMxNjYzOTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlLCJ1c2FnZSI6InN1YnNldCJ9" | |
}, | |
"childNodes": [], | |
"id": 87.0 | |
}, | |
{ | |
"id": 88.0, | |
"type": 2.0, | |
"tagName": "script", | |
"attributes": { | |
"src": "https://securepubads.g.doubleclick.net/gpt/pubads_impl_2021092201.js?31062996", | |
"async": "" | |
}, | |
"childNodes": [] | |
}, | |
{ | |
"tagName": "link", | |
"attributes": { | |
"rel": "preload", | |
"href": "https://adservice.google.dz/adsid/integrator.js?domain=stackoverflow.com", | |
"as": "script" | |
}, | |
"childNodes": [], | |
"id": 89.0, | |
"type": 2.0 | |
}, | |
{ | |
"id": 90.0, | |
"type": 2.0, | |
"tagName": "script", | |
"attributes": { | |
"type": "text/javascript", | |
"src": "https://adservice.google.dz/adsid/integrator.js?domain=stackoverflow.com" | |
}, | |
"childNodes": [] | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "link", | |
"attributes": { | |
"rel": "preload", | |
"href": "https://adservice.google.com/adsid/integrator.js?domain=stackoverflow.com", | |
"as": "script" | |
}, | |
"childNodes": [], | |
"id": 91.0 | |
}, | |
{ | |
"tagName": "script", | |
"attributes": { | |
"type": "text/javascript", | |
"src": "https://adservice.google.com/adsid/integrator.js?domain=stackoverflow.com" | |
}, | |
"childNodes": [], | |
"id": 92.0, | |
"type": 2.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "script", | |
"attributes": { "async": "", "src": "https://cdn.sstatic.net/Js/full.en.js?v=3668bea0f6be" }, | |
"childNodes": [], | |
"id": 93.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "script", | |
"attributes": { | |
"async": "", | |
"src": "https://cdn.sstatic.net/Js/post-validation.en.js?v=4513589b7491" | |
}, | |
"childNodes": [], | |
"id": 94.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "script", | |
"attributes": { | |
"async": "", | |
"src": "https://cdn.sstatic.net/Js/highlightjs-loader.en.js?v=1d47ebfbed03" | |
}, | |
"childNodes": [], | |
"id": 95.0 | |
}, | |
{ | |
"childNodes": [], | |
"id": 96.0, | |
"type": 2.0, | |
"tagName": "script", | |
"attributes": { "async": "", "src": "https://cdn.sstatic.net/Js/wmd.en.js?v=63ac08e0db55" } | |
}, | |
{ | |
"tagName": "style", | |
"attributes": { "type": "text/css" }, | |
"childNodes": [ | |
{ | |
"textContent": " .wmd-snippet-button span { background-position: 0 0; } .wmd-snippet-button:hover span { background-position: 0 -40px; }", | |
"isStyle": true, | |
"id": 98.0, | |
"type": 3.0 | |
} | |
], | |
"id": 97.0, | |
"type": 2.0 | |
} | |
], | |
"id": 4.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 99.0 }, | |
{ | |
"childNodes": [ | |
{ "id": 101.0, "type": 3.0, "textContent": "\n " }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "id": "notify-container" }, | |
"childNodes": [], | |
"id": 102.0 | |
}, | |
{ "textContent": "\n ", "id": 103.0, "type": 3.0 }, | |
{ | |
"tagName": "div", | |
"attributes": { "id": "custom-header" }, | |
"childNodes": [], | |
"id": 104.0, | |
"type": 2.0 | |
}, | |
{ "id": 105.0, "type": 3.0, "textContent": "\n \n" }, | |
{ | |
"type": 2.0, | |
"tagName": "header", | |
"attributes": { "class": "top-bar js-top-bar top-bar__network" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 107.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "wmx12 mx-auto d-flex ai-center h100", "role": "menubar" }, | |
"childNodes": [ | |
{ "textContent": "\n ", "id": 109.0, "type": 3.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "-main flex--item" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 111.0 }, | |
{ | |
"attributes": { | |
"href": "https://stackoverflow.com/questions/54824036/useeffect-hook-with-socket-io-state-is-not-persistent-in-socket-handlers#", | |
"class": "left-sidebar-toggle p0 ai-center jc-center js-left-sidebar-toggle", | |
"role": "menuitem", | |
"aria-haspopup": "true", | |
"aria-controls": "left-sidebar", | |
"aria-expanded": "false" | |
}, | |
"childNodes": [ | |
{ | |
"id": 113.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "ps-relative" }, | |
"childNodes": [] | |
} | |
], | |
"id": 112.0, | |
"type": 2.0, | |
"tagName": "a" | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 114.0 }, | |
{ | |
"childNodes": [ | |
{ "textContent": "\n ", "id": 116.0, "type": 3.0 }, | |
{ | |
"childNodes": [], | |
"id": 117.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "left-sidebar js-unpinned-left-sidebar", | |
"data-can-be": "left-sidebar", | |
"data-is-here-when": "sm" | |
} | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 118.0 } | |
], | |
"id": 115.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "topbar-dialog leftnav-dialog js-leftnav-dialog dno" } | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 119.0 }, | |
{ | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackoverflow.com/", | |
"class": "-logo js-gps-track", | |
"data-gps-track": "top_nav.click({is_current:false, location:2, destination:8})" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 121.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "-img _glyph" }, | |
"childNodes": [{ "type": 3.0, "textContent": "Stack Overflow", "id": 123.0 }], | |
"id": 122.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 124.0 } | |
], | |
"id": 120.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": "\n\n\n\n ", "id": 125.0 } | |
], | |
"id": 110.0 | |
}, | |
{ "type": 3.0, "textContent": "\n\n ", "id": 126.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "ol", | |
"attributes": { "class": "list-reset d-flex gs4", "role": "presentation" }, | |
"childNodes": [ | |
{ "id": 128.0, "type": 3.0, "textContent": "\n\n\n " }, | |
{ | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 130.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackoverflow.com/questions/54824036/useeffect-hook-with-socket-io-state-is-not-persistent-in-socket-handlers#", | |
"class": "-marketing-link js-gps-track js-products-menu", | |
"data-controller": "s-popover", | |
"data-action": "s-popover#toggle", | |
"aria-controls": "products-popover", | |
"data-s-popover-placement": "bottom", | |
"data-s-popover-toggle-class": "is-selected", | |
"data-gps-track": "top_nav.products.click({location:2, destination:1})", | |
"data-ga": "[\"top navigation\",\"products menu click\",null,null,null]" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n Products\n ", | |
"id": 132.0 | |
} | |
], | |
"id": 131.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 133.0 } | |
], | |
"id": 129.0, | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": { "class": "flex--item" } | |
}, | |
{ "type": 3.0, "textContent": "\n\n ", "id": 134.0 } | |
], | |
"id": 127.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 135.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "s-popover ws2 mtn2 p0", | |
"id": "products-popover", | |
"role": "menu", | |
"aria-hidden": "true" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 137.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "s-popover--arrow" }, | |
"childNodes": [], | |
"id": 138.0 | |
}, | |
{ "id": 139.0, "type": 3.0, "textContent": "\n " }, | |
{ | |
"type": 2.0, | |
"tagName": "ol", | |
"attributes": { "class": "list-reset s-anchors s-anchors__inherit" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 141.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": { "class": "m6" }, | |
"childNodes": [ | |
{ "id": 143.0, "type": 3.0, "textContent": "\n " }, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackoverflow.com/", | |
"class": "bar-sm p6 d-block h:bg-black-100 js-gps-track", | |
"data-gps-track": "top_nav.products.click({location:2, destination:2})", | |
"data-ga": "[\"top navigation\",\"public qa submenu click\",null,null,null]" | |
}, | |
"childNodes": [ | |
{ "textContent": "\n ", "id": 145.0, "type": 3.0 }, | |
{ | |
"tagName": "span", | |
"attributes": { "class": "fs-body1 d-block" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "Stack Overflow", "id": 147.0 } | |
], | |
"id": 146.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 148.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "fs-caption d-block fc-light" }, | |
"childNodes": [ | |
{ | |
"textContent": "Public questions \u0026 answers", | |
"id": 150.0, | |
"type": 3.0 | |
} | |
], | |
"id": 149.0 | |
}, | |
{ "id": 151.0, "type": 3.0, "textContent": "\n " } | |
], | |
"id": 144.0 | |
}, | |
{ "textContent": "\n ", "id": 152.0, "type": 3.0 } | |
], | |
"id": 142.0 | |
}, | |
{ "id": 153.0, "type": 3.0, "textContent": "\n " }, | |
{ | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": { "class": "m6" }, | |
"childNodes": [ | |
{ "id": 155.0, "type": 3.0, "textContent": "\n " }, | |
{ | |
"id": 156.0, | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"data-ga": "[\"top navigation\",\"teams submenu click\",null,null,null]", | |
"href": "https://stackoverflow.com/teams", | |
"class": "bar-sm p6 d-block h:bg-black-100 js-gps-track", | |
"data-gps-track": "top_nav.products.click({location:2, destination:3})" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 157.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "fs-body1 d-block" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "Stack Overflow for Teams", "id": 159.0 } | |
], | |
"id": 158.0 | |
}, | |
{ "textContent": "\n ", "id": 160.0, "type": 3.0 }, | |
{ | |
"id": 161.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "fs-caption d-block fc-light" }, | |
"childNodes": [ | |
{ | |
"textContent": "Where developers \u0026 technologists share private knowledge with coworkers", | |
"id": 162.0, | |
"type": 3.0 | |
} | |
] | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 163.0 } | |
] | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 164.0 } | |
], | |
"id": 154.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 165.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": { "class": "m6" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 167.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"data-gps-track": "top_nav.products.click({location:2, destination:9})", | |
"data-ga": "[\"top navigation\",\"jobs submenu click\",null,null,null]", | |
"href": "https://stackoverflow.com/jobs?so_source=ProductsMenu\u0026so_medium=StackOverflow", | |
"class": "bar-sm p6 d-block h:bg-black-100 js-gps-track" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 169.0 }, | |
{ | |
"id": 170.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "fs-body1 d-block" }, | |
"childNodes": [{ "id": 171.0, "type": 3.0, "textContent": "Jobs" }] | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 172.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "fs-caption d-block fc-light" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Programming \u0026 related technical career opportunities", | |
"id": 174.0 | |
} | |
], | |
"id": 173.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 175.0 } | |
], | |
"id": 168.0 | |
}, | |
{ "textContent": "\n ", "id": 176.0, "type": 3.0 } | |
], | |
"id": 166.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 177.0 }, | |
{ | |
"id": 178.0, | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": { "class": "m6" }, | |
"childNodes": [ | |
{ "textContent": "\n ", "id": 179.0, "type": 3.0 }, | |
{ | |
"id": 180.0, | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackoverflow.com/talent", | |
"class": "bar-sm p6 d-block h:bg-black-100 js-gps-track", | |
"data-gps-track": "top_nav.products.click({location:2, destination:5})", | |
"data-ga": "[\"top navigation\",\"talent submenu click\",null,null,null]" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 181.0 }, | |
{ | |
"tagName": "span", | |
"attributes": { "class": "fs-body1 d-block" }, | |
"childNodes": [{ "id": 183.0, "type": 3.0, "textContent": "Talent" }], | |
"id": 182.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 184.0 }, | |
{ | |
"attributes": { "class": "fs-caption d-block fc-light" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Recruit tech talent \u0026 build your employer brand", | |
"id": 186.0 | |
} | |
], | |
"id": 185.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ "id": 187.0, "type": 3.0, "textContent": "\n " } | |
] | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 188.0 } | |
] | |
}, | |
{ "id": 189.0, "type": 3.0, "textContent": "\n " }, | |
{ | |
"id": 190.0, | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": { "class": "m6" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 191.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackoverflow.com/advertising", | |
"class": "bar-sm p6 d-block h:bg-black-100 js-gps-track", | |
"data-gps-track": "top_nav.products.click({location:2, destination:6})", | |
"data-ga": "[\"top navigation\",\"advertising submenu click\",null,null,null]" | |
}, | |
"childNodes": [ | |
{ "id": 193.0, "type": 3.0, "textContent": "\n " }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "fs-body1 d-block" }, | |
"childNodes": [{ "type": 3.0, "textContent": "Advertising", "id": 195.0 }], | |
"id": 194.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 196.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "fs-caption d-block fc-light" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Reach developers \u0026 technologists worldwide", | |
"id": 198.0 | |
} | |
], | |
"id": 197.0 | |
}, | |
{ "textContent": "\n ", "id": 199.0, "type": 3.0 } | |
], | |
"id": 192.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 200.0 } | |
] | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 201.0 }, | |
{ | |
"attributes": { "class": "bg-black-025 bt bc-black-075 py6 px6 bbr-md" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 203.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackoverflow.com/company", | |
"class": "fc-light d-block py6 px6 h:fc-black-800 js-gps-track", | |
"data-gps-track": "top_nav.products.click({location:2, destination:7})", | |
"data-ga": "[\"top navigation\",\"about submenu click\",null,null,null]" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "About the company", "id": 205.0 } | |
], | |
"id": 204.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 206.0 } | |
], | |
"id": 202.0, | |
"type": 2.0, | |
"tagName": "li" | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 207.0 } | |
], | |
"id": 140.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 208.0 } | |
], | |
"id": 136.0 | |
}, | |
{ "type": 3.0, "textContent": "\n\n ", "id": 209.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "form", | |
"attributes": { | |
"id": "search", | |
"role": "search", | |
"action": "/search", | |
"class": "flex--item fl-grow1 searchbar px12 js-searchbar ", | |
"autocomplete": "off" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 211.0 }, | |
{ | |
"attributes": { "class": "ps-relative" }, | |
"childNodes": [ | |
{ "textContent": "\n ", "id": 213.0, "type": 3.0 }, | |
{ | |
"tagName": "input", | |
"attributes": { | |
"type": "text", | |
"placeholder": "Search…", | |
"data-action": "focus-\u003es-popover#show", | |
"aria-label": "Search", | |
"aria-controls": "top-search", | |
"data-controller": "s-popover", | |
"name": "q", | |
"value": "", | |
"autocomplete": "off", | |
"maxlength": "240", | |
"class": "s-input s-input__search js-search-field ", | |
"data-s-popover-placement": "bottom-start" | |
}, | |
"childNodes": [], | |
"id": 214.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 215.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "svg", | |
"attributes": { | |
"aria-hidden": "true", | |
"class": "s-input-icon s-input-icon__search svg-icon iconSearch", | |
"width": "18", | |
"height": "18", | |
"viewBox": "0 0 18 18" | |
}, | |
"childNodes": [ | |
{ | |
"id": 217.0, | |
"type": 2.0, | |
"tagName": "path", | |
"attributes": { | |
"d": "m18 16.5-5.14-5.18h-.35a7 7 0 10-1.19 1.19v.35L16.5 18l1.5-1.5ZM12 7A5 5 0 112 7a5 5 0 0110 0Z" | |
}, | |
"childNodes": [] | |
} | |
], | |
"isSVG": true, | |
"id": 216.0 | |
}, | |
{ "id": 218.0, "type": 3.0, "textContent": "\n " }, | |
{ | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 220.0 }, | |
{ | |
"tagName": "div", | |
"attributes": { "class": "s-popover--arrow" }, | |
"childNodes": [], | |
"id": 221.0, | |
"type": 2.0 | |
}, | |
{ "id": 222.0, "type": 3.0, "textContent": "\n " }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "js-spinner p24 d-flex ai-center jc-center d-none" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 224.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "s-spinner s-spinner__sm fc-orange-400" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 226.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "v-visible-sr" }, | |
"childNodes": [{ "type": 3.0, "textContent": "Loading…", "id": 228.0 }], | |
"id": 227.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 229.0 } | |
], | |
"id": 225.0 | |
}, | |
{ "id": 230.0, "type": 3.0, "textContent": "\n " } | |
], | |
"id": 223.0 | |
}, | |
{ "type": 3.0, "textContent": "\n\n ", "id": 231.0 }, | |
{ | |
"id": 232.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "v-visible-sr js-screen-reader-info" }, | |
"childNodes": [] | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 233.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "js-ac-results overflow-y-auto hmx3 d-none" }, | |
"childNodes": [], | |
"id": 234.0 | |
}, | |
{ "type": 3.0, "textContent": "\n\n ", "id": 235.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "js-search-hints", | |
"aria-describedby": "Tips for searching" | |
}, | |
"childNodes": [], | |
"id": 236.0 | |
}, | |
{ "type": 3.0, "textContent": "\n", "id": 237.0 } | |
], | |
"id": 219.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "s-popover p0 wmx100 wmn4 sm:wmn-initial js-top-search-popover", | |
"id": "top-search", | |
"role": "menu" | |
} | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 238.0 } | |
], | |
"id": 212.0, | |
"type": 2.0, | |
"tagName": "div" | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 239.0 } | |
], | |
"id": 210.0 | |
}, | |
{ "type": 3.0, "textContent": "\n \n \n\n", "id": 240.0 }, | |
{ | |
"id": 241.0, | |
"type": 2.0, | |
"tagName": "ol", | |
"attributes": { | |
"class": "overflow-x-auto ml-auto -secondary d-flex ai-center list-reset h100 user-logged-in", | |
"role": "presentation" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 242.0 }, | |
{ | |
"tagName": "li", | |
"attributes": { "class": "-item searchbar-trigger" }, | |
"childNodes": [ | |
{ | |
"attributes": { | |
"role": "button", | |
"aria-label": "Search", | |
"aria-haspopup": "true", | |
"aria-controls": "search", | |
"title": "Click to show search", | |
"href": "https://stackoverflow.com/questions/54824036/useeffect-hook-with-socket-io-state-is-not-persistent-in-socket-handlers#", | |
"class": "-link js-searchbar-trigger" | |
}, | |
"childNodes": [ | |
{ | |
"tagName": "svg", | |
"attributes": { | |
"aria-hidden": "true", | |
"class": "svg-icon iconSearch", | |
"width": "18", | |
"height": "18", | |
"viewBox": "0 0 18 18" | |
}, | |
"childNodes": [ | |
{ | |
"childNodes": [], | |
"id": 246.0, | |
"type": 2.0, | |
"tagName": "path", | |
"attributes": { | |
"d": "m18 16.5-5.14-5.18h-.35a7 7 0 10-1.19 1.19v.35L16.5 18l1.5-1.5ZM12 7A5 5 0 112 7a5 5 0 0110 0Z" | |
} | |
} | |
], | |
"isSVG": true, | |
"id": 245.0, | |
"type": 2.0 | |
} | |
], | |
"id": 244.0, | |
"type": 2.0, | |
"tagName": "a" | |
} | |
], | |
"id": 243.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 247.0 }, | |
{ | |
"childNodes": [ | |
{ "textContent": "\n ", "id": 249.0, "type": 3.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackoverflow.com/users/11971167/hachour-fouad", | |
"class": "my-profile js-gps-track", | |
"data-gps-track": "profile_summary.click()" | |
}, | |
"childNodes": [ | |
{ "textContent": "\n", "id": 251.0, "type": 3.0 }, | |
{ | |
"tagName": "div", | |
"attributes": { "title": "Hachour Fouad", "class": "gravatar-wrapper-24" }, | |
"childNodes": [ | |
{ | |
"type": 2.0, | |
"tagName": "img", | |
"attributes": { | |
"class": "bar-sm -avatar js-avatar-me", | |
"src": "https://graph.facebook.com/2454376771464559/picture?type=large", | |
"alt": "", | |
"width": "24", | |
"height": "24" | |
}, | |
"childNodes": [], | |
"id": 253.0 | |
} | |
], | |
"id": 252.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": " ", "id": 254.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "v-visible-sr" }, | |
"childNodes": [{ "type": 3.0, "textContent": "Hachour Fouad", "id": 256.0 }], | |
"id": 255.0 | |
}, | |
{ "type": 3.0, "textContent": "\n\n ", "id": 257.0 }, | |
{ | |
"attributes": { | |
"class": "-rep js-header-rep", | |
"title": "your reputation: 3", | |
"aria-hidden": "true" | |
}, | |
"childNodes": [{ "type": 3.0, "textContent": "3", "id": 259.0 }], | |
"id": 258.0, | |
"type": 2.0, | |
"tagName": "div" | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 260.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "v-visible-sr" }, | |
"childNodes": [{ "type": 3.0, "textContent": ", 3 reputation", "id": 262.0 }], | |
"id": 261.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 263.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "-badges" }, | |
"childNodes": [ | |
{ "id": 265.0, "type": 3.0, "textContent": "\n" }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "title": "3 bronze badges", "aria-hidden": "true" }, | |
"childNodes": [ | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "badge3" }, | |
"childNodes": [{ "type": 3.0, "textContent": "●", "id": 268.0 }], | |
"id": 267.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "badgecount" }, | |
"childNodes": [{ "textContent": "3", "id": 270.0, "type": 3.0 }], | |
"id": 269.0 | |
} | |
], | |
"id": 266.0 | |
}, | |
{ | |
"tagName": "span", | |
"attributes": { "class": "v-visible-sr" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "3 bronze badges", "id": 272.0 } | |
], | |
"id": 271.0, | |
"type": 2.0 | |
}, | |
{ "id": 273.0, "type": 3.0, "textContent": " " } | |
], | |
"id": 264.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 274.0 } | |
], | |
"id": 250.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 275.0 } | |
], | |
"id": 248.0, | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": { "class": "-item" } | |
}, | |
{ "id": 276.0, "type": 3.0, "textContent": "\n " }, | |
{ | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": { "class": "-item inbox-button-item" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 278.0 }, | |
{ | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 280.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "svg", | |
"attributes": { | |
"aria-hidden": "true", | |
"class": "svg-icon iconInbox", | |
"width": "20", | |
"height": "18", | |
"viewBox": "0 0 20 18" | |
}, | |
"childNodes": [ | |
{ | |
"type": 2.0, | |
"tagName": "path", | |
"attributes": { | |
"d": "M4.63 1h10.56a2 2 0 011.94 1.35L20 10.79V15a2 2 0 01-2 2H2a2 2 0 01-2-2v-4.21l2.78-8.44c.25-.8 1-1.36 1.85-1.35Zm8.28 12 2-2h2.95l-2.44-7.32a1 1 0 00-.95-.68H5.35a1 1 0 00-.95.68L1.96 11h2.95l2 2h6Z" | |
}, | |
"childNodes": [], | |
"id": 282.0 | |
} | |
], | |
"isSVG": true, | |
"id": 281.0 | |
}, | |
{ "textContent": "\n ", "id": 283.0, "type": 3.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "indicator-badge js-unread-count _important d-none" }, | |
"childNodes": [{ "id": 285.0, "type": 3.0, "textContent": "0" }], | |
"id": 284.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 286.0 } | |
], | |
"id": 279.0, | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"aria-label": "Inbox", | |
"title": "Recent inbox messages", | |
"role": "menuitem", | |
"aria-haspopup": "true", | |
"aria-expanded": "false", | |
"data-unread-count": "0", | |
"href": "https://stackexchange.com/users/16566839?tab=inbox", | |
"class": "-link js-inbox-button" | |
} | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 287.0 } | |
], | |
"id": 277.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 288.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": { "class": "-item achievements-button-item" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 290.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"aria-haspopup": "true", | |
"data-lit-up": "false", | |
"href": "https://stackexchange.com/users/16566839?tab=reputation", | |
"class": "-link js-achievements-button", | |
"data-unread-class": "_highlighted-positive", | |
"aria-label": "Achievements", | |
"title": "Recent achievements: reputation, badges, and privileges earned", | |
"role": "menuitem", | |
"aria-expanded": "false", | |
"data-unread-count": "0" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 292.0 }, | |
{ | |
"attributes": { | |
"aria-hidden": "true", | |
"class": "svg-icon iconAchievements", | |
"width": "18", | |
"height": "18", | |
"viewBox": "0 0 18 18" | |
}, | |
"childNodes": [ | |
{ | |
"type": 2.0, | |
"tagName": "path", | |
"attributes": { | |
"d": "M15 2V1H3v1H0v4c0 1.6 1.4 3 3 3v1c.4 1.5 3 2.6 5 3v2H5s-1 1.5-1 2h10c0-.4-1-2-1-2h-3v-2c2-.4 4.6-1.5 5-3V9c1.6-.2 3-1.4 3-3V2h-3ZM3 7c-.5 0-1-.5-1-1V4h1v3Zm8.4 2.5L9 8 6.6 9.4l1-2.7L5 5h3l1-2.7L10 5h2.8l-2.3 1.8 1 2.7h-.1ZM16 6c0 .5-.5 1-1 1V4h1v2Z" | |
}, | |
"childNodes": [], | |
"id": 294.0 | |
} | |
], | |
"isSVG": true, | |
"id": 293.0, | |
"type": 2.0, | |
"tagName": "svg" | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 295.0 }, | |
{ | |
"tagName": "span", | |
"attributes": { "class": "indicator-badge js-unread-count _positive d-none" }, | |
"childNodes": [{ "type": 3.0, "textContent": "+0", "id": 297.0 }], | |
"id": 296.0, | |
"type": 2.0 | |
}, | |
{ "textContent": "\n ", "id": 298.0, "type": 3.0 } | |
], | |
"id": 291.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 299.0 } | |
], | |
"id": 289.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 300.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": { "class": "-item help-button-item" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 302.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"data-ga": "[\"top navigation\",\"help menu click\",null,null,null]", | |
"href": "https://stackoverflow.com/questions/54824036/useeffect-hook-with-socket-io-state-is-not-persistent-in-socket-handlers#", | |
"class": "-link js-help-button", | |
"title": "Help Center and other resources", | |
"role": "menuitem", | |
"aria-haspopup": "true", | |
"aria-controls": "topbar-help-dialog" | |
}, | |
"childNodes": [ | |
{ | |
"tagName": "svg", | |
"attributes": { | |
"height": "18", | |
"viewBox": "0 0 18 18", | |
"aria-hidden": "true", | |
"class": "svg-icon iconHelp", | |
"width": "18" | |
}, | |
"childNodes": [ | |
{ | |
"childNodes": [], | |
"id": 305.0, | |
"type": 2.0, | |
"tagName": "path", | |
"attributes": { | |
"d": "M9 1C4.64 1 1 4.64 1 9c0 4.36 3.64 8 8 8 4.36 0 8-3.64 8-8 0-4.36-3.64-8-8-8Zm.81 12.13c-.02.71-.55 1.15-1.24 1.13-.66-.02-1.17-.49-1.15-1.2.02-.72.56-1.18 1.22-1.16.7.03 1.2.51 1.17 1.23ZM11.77 8c-.59.66-1.78 1.09-2.05 1.97a4 4 0 00-.09.75c0 .05-.03.16-.18.16H7.88c-.16 0-.18-.1-.18-.15.06-1.35.66-2.2 1.83-2.88.39-.29.7-.75.7-1.24.01-1.24-1.64-1.82-2.35-.72-.21.33-.18.73-.18 1.1H5.75c0-1.97 1.03-3.26 3.03-3.26 1.75 0 3.47.87 3.47 2.83 0 .57-.2 1.05-.48 1.44Z" | |
} | |
} | |
], | |
"isSVG": true, | |
"id": 304.0, | |
"type": 2.0 | |
} | |
], | |
"id": 303.0 | |
}, | |
{ "textContent": "\n ", "id": 306.0, "type": 3.0 } | |
], | |
"id": 301.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 307.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "topbar-dialog help-dialog js-help-dialog dno", | |
"id": "topbar-help-dialog", | |
"role": "menu" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 309.0 }, | |
{ | |
"id": 310.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "modal-content" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 311.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "ul", | |
"attributes": {}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 313.0 }, | |
{ | |
"tagName": "li", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 315.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackoverflow.com/tour", | |
"class": "js-gps-track", | |
"data-gps-track": "help_popup.click({ item_type:1 })", | |
"data-ga": "[\"top navigation\",\"tour submenu click\",null,null,null]" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n Tour\n ", | |
"id": 317.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "item-summary" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n Start here for a quick overview of the site\n ", | |
"id": 319.0 | |
} | |
], | |
"id": 318.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 320.0 | |
} | |
], | |
"id": 316.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 321.0 } | |
], | |
"id": 314.0, | |
"type": 2.0 | |
}, | |
{ "id": 322.0, "type": 3.0, "textContent": "\n " }, | |
{ | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": {}, | |
"childNodes": [ | |
{ "textContent": "\n ", "id": 324.0, "type": 3.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackoverflow.com/help", | |
"class": "js-gps-track", | |
"data-gps-track": "help_popup.click({ item_type:4 })", | |
"data-ga": "[\"top navigation\",\"help center\",null,null,null]" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n Help Center\n ", | |
"id": 326.0 | |
}, | |
{ | |
"id": 327.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "item-summary" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n Detailed answers to any questions you might have\n ", | |
"id": 328.0 | |
} | |
] | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 329.0 | |
} | |
], | |
"id": 325.0 | |
}, | |
{ "textContent": "\n ", "id": 330.0, "type": 3.0 } | |
], | |
"id": 323.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 331.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 333.0 | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"id": 335.0, | |
"type": 3.0, | |
"textContent": "\n Meta\n " | |
}, | |
{ | |
"attributes": { "class": "item-summary" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n Discuss the workings and policies of this site\n ", | |
"id": 337.0 | |
} | |
], | |
"id": 336.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ | |
"textContent": "\n ", | |
"id": 338.0, | |
"type": 3.0 | |
} | |
], | |
"id": 334.0, | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://meta.stackoverflow.com/", | |
"class": "js-gps-track", | |
"data-gps-track": "help_popup.click({ item_type:2 })", | |
"data-ga": "[\"top navigation\",\"meta submenu click\",null,null,null]" | |
} | |
}, | |
{ | |
"textContent": "\n ", | |
"id": 339.0, | |
"type": 3.0 | |
} | |
], | |
"id": 332.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 340.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 342.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackoverflow.com/company", | |
"class": "js-gps-track", | |
"data-gps-track": "help_popup.click({ item_type:6 })", | |
"data-ga": "[\"top navigation\",\"about us submenu click\",null,null,null]" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n About Us\n ", | |
"id": 344.0 | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n Learn more about Stack Overflow the company\n ", | |
"id": 346.0 | |
} | |
], | |
"id": 345.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "item-summary" } | |
}, | |
{ | |
"id": 347.0, | |
"type": 3.0, | |
"textContent": "\n " | |
} | |
], | |
"id": 343.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 348.0 | |
} | |
], | |
"id": 341.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 349.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"textContent": "\n ", | |
"id": 351.0, | |
"type": 3.0 | |
}, | |
{ | |
"id": 352.0, | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"data-gps-track": "help_popup.click({ item_type:7 })", | |
"data-ga": "[\"top navigation\",\"business submenu click\",null,null,null]", | |
"href": "https://stackoverflowbusiness.com/?ref=topbar_help", | |
"class": "js-gps-track" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n Business\n ", | |
"id": 353.0 | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"id": 355.0, | |
"type": 3.0, | |
"textContent": "\n Learn more about hiring developers or posting ads with us\n " | |
} | |
], | |
"id": 354.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "item-summary" } | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 356.0 | |
} | |
] | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 357.0 | |
} | |
], | |
"id": 350.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 358.0 } | |
], | |
"id": 312.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 359.0 } | |
] | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 360.0 } | |
], | |
"id": 308.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 361.0 }, | |
{ | |
"id": 362.0, | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": { "class": "-item site-switcher-item" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 363.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"role": "menuitem", | |
"aria-haspopup": "true", | |
"data-gps-track": "site_switcher.show", | |
"aria-label": "Site switcher", | |
"title": "A list of all 178 Stack Exchange sites", | |
"aria-expanded": "false", | |
"data-ga": "[\"top navigation\",\"stack exchange click\",null,null,null]", | |
"href": "https://stackexchange.com/", | |
"class": "-link js-site-switcher-button js-gps-track" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 365.0 }, | |
{ | |
"attributes": { | |
"width": "18", | |
"height": "18", | |
"viewBox": "0 0 18 18", | |
"aria-hidden": "true", | |
"class": "svg-icon iconStackExchange" | |
}, | |
"childNodes": [ | |
{ | |
"tagName": "path", | |
"attributes": { | |
"d": "M15 1H3a2 2 0 00-2 2v2h16V3a2 2 0 00-2-2ZM1 13c0 1.1.9 2 2 2h8v3l3-3h1a2 2 0 002-2v-2H1v2Zm16-7H1v4h16V6Z" | |
}, | |
"childNodes": [], | |
"id": 367.0, | |
"type": 2.0 | |
} | |
], | |
"isSVG": true, | |
"id": 366.0, | |
"type": 2.0, | |
"tagName": "svg" | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 368.0 } | |
], | |
"id": 364.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 369.0 } | |
] | |
}, | |
{ "type": 3.0, "textContent": "\n\n\n ", "id": 370.0 }, | |
{ | |
"attributes": { "class": "js-topbar-dialog-corral", "role": "presentation" }, | |
"childNodes": [ | |
{ "id": 372.0, "type": 3.0, "textContent": "\n \n\n " }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "topbar-dialog siteSwitcher-dialog dno", "role": "menu" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 374.0 }, | |
{ | |
"tagName": "div", | |
"attributes": { "class": "header fw-wrap" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 376.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "h3", | |
"attributes": { "class": "flex--item" }, | |
"childNodes": [ | |
{ "id": 378.0, "type": 3.0, "textContent": "\n " }, | |
{ | |
"attributes": { "href": "https://stackoverflow.com/" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "current community", "id": 380.0 } | |
], | |
"id": 379.0, | |
"type": 2.0, | |
"tagName": "a" | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 381.0 } | |
], | |
"id": 377.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 382.0 }, | |
{ | |
"attributes": { "class": "flex--item fl1" }, | |
"childNodes": [ | |
{ "textContent": "\n ", "id": 384.0, "type": 3.0 }, | |
{ | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 386.0 }, | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 388.0 | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"childNodes": [], | |
"id": 390.0, | |
"type": 2.0, | |
"tagName": "path", | |
"attributes": { | |
"d": "M15 4.41 13.59 3 9 7.59 4.41 3 3 4.41 7.59 9 3 13.59 4.41 15 9 10.41 13.59 15 15 13.59 10.41 9 15 4.41Z" | |
} | |
} | |
], | |
"isSVG": true, | |
"id": 389.0, | |
"type": 2.0, | |
"tagName": "svg", | |
"attributes": { | |
"aria-hidden": "true", | |
"class": "svg-icon iconClear", | |
"width": "18", | |
"height": "18", | |
"viewBox": "0 0 18 18" | |
} | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 391.0 | |
} | |
], | |
"id": 387.0, | |
"type": 2.0, | |
"tagName": "button", | |
"attributes": { | |
"type": "button", | |
"aria-label": "Close", | |
"class": "js-close-button s-btn s-btn__muted p0 ml8 d-none sm:d-block" | |
} | |
}, | |
{ "textContent": "\n ", "id": 392.0, "type": 3.0 } | |
], | |
"id": 385.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "ai-center d-flex jc-end" } | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 393.0 } | |
], | |
"id": 383.0, | |
"type": 2.0, | |
"tagName": "div" | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 394.0 } | |
], | |
"id": 375.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 395.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "modal-content bg-powder-050 current-site-container" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 397.0 }, | |
{ | |
"id": 398.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "d-none sm:d-block" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 399.0 }, | |
{ | |
"id": 400.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "d-flex ai-end" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 401.0 | |
}, | |
{ | |
"id": 402.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "s-user-card flex--item fl1" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 403.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackoverflow.com/users/11971167/hachour-fouad", | |
"class": "s-avatar s-avatar__32 s-user-card--avatar" | |
}, | |
"childNodes": [ | |
{ | |
"id": 405.0, | |
"type": 3.0, | |
"textContent": "\n " | |
}, | |
{ | |
"attributes": { "class": "gravatar-wrapper-32" }, | |
"childNodes": [ | |
{ | |
"type": 2.0, | |
"tagName": "img", | |
"attributes": { | |
"src": "https://graph.facebook.com/2454376771464559/picture?type=large", | |
"alt": "", | |
"width": "32", | |
"height": "32", | |
"class": "bar-sm avatar s-avatar--image" | |
}, | |
"childNodes": [], | |
"id": 407.0 | |
} | |
], | |
"id": 406.0, | |
"type": 2.0, | |
"tagName": "div" | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 408.0 | |
} | |
], | |
"id": 404.0 | |
}, | |
{ | |
"id": 409.0, | |
"type": 3.0, | |
"textContent": "\n " | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "s-user-card--info" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 411.0 | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Hachour Fouad", | |
"id": 413.0 | |
} | |
], | |
"id": 412.0, | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackoverflow.com/users/11971167/hachour-fouad", | |
"class": "s-user-card--link" | |
} | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 414.0 | |
}, | |
{ | |
"id": 415.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "s-user-card--awards lh-unset fc-black-700 fw-bold" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 416.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { | |
"dir": "ltr", | |
"class": "reputation-score", | |
"title": "reputation score " | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "3", "id": 418.0 } | |
], | |
"id": 417.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { | |
"title": "3 bronze badges", | |
"aria-hidden": "true" | |
}, | |
"childNodes": [ | |
{ | |
"attributes": { "class": "badge3" }, | |
"childNodes": [], | |
"id": 420.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ | |
"attributes": { "class": "badgecount" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "3", "id": 422.0 } | |
], | |
"id": 421.0, | |
"type": 2.0, | |
"tagName": "span" | |
} | |
], | |
"id": 419.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "v-visible-sr" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "3 bronze badges", | |
"id": 424.0 | |
} | |
], | |
"id": 423.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 425.0 | |
} | |
] | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 426.0 | |
} | |
], | |
"id": 410.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 427.0 | |
} | |
] | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 428.0 | |
}, | |
{ | |
"id": 429.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "related-links flex--item p8" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 430.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"data-gps-track": "site_switcher.click({ item_type:8 })", | |
"href": "https://stackoverflow.com/users/logout" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "log out", "id": 432.0 } | |
], | |
"id": 431.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 433.0 | |
} | |
] | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 434.0 } | |
] | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 435.0 } | |
] | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 436.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "ul", | |
"attributes": { "class": "current-site " }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 438.0 }, | |
{ | |
"tagName": "li", | |
"attributes": { "class": "d-flex" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 440.0 | |
}, | |
{ | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 442.0 }, | |
{ | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 444.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "favicon favicon-stackoverflow site-icon flex--item", | |
"title": "Stack Overflow" | |
}, | |
"childNodes": [], | |
"id": 445.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 446.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "flex--item fl1" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n Stack Overflow\n ", | |
"id": 448.0 | |
} | |
], | |
"id": 447.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 449.0 } | |
], | |
"id": 443.0, | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackoverflow.com/", | |
"class": "current-site-link site-link js-gps-track d-flex gs8 gsx", | |
"data-id": "1", | |
"data-gps-track": "site_switcher.click({ item_type:3 })" | |
} | |
}, | |
{ "type": 3.0, "textContent": "\n\n ", "id": 450.0 } | |
], | |
"id": 441.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "fl1" } | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 451.0 }, | |
{ | |
"id": 452.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "related-links" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 453.0 }, | |
{ | |
"tagName": "a", | |
"attributes": { | |
"data-gps-track": "site_switcher.click({ item_type:14 })", | |
"href": "https://stackoverflow.com/help", | |
"class": "js-gps-track" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "help", "id": 455.0 } | |
], | |
"id": 454.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 456.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://chat.stackoverflow.com/?tab=site\u0026host=stackoverflow.com", | |
"class": "js-gps-track", | |
"data-gps-track": "site_switcher.click({ item_type:6 })" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "chat", "id": 458.0 } | |
], | |
"id": 457.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 459.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackoverflow.com/users/logout", | |
"class": "js-gps-track", | |
"data-gps-track": "site_switcher.click({ item_type:8 })" | |
}, | |
"childNodes": [ | |
{ "id": 461.0, "type": 3.0, "textContent": "log out" } | |
], | |
"id": 460.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 462.0 } | |
] | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n\n ", | |
"id": 463.0 | |
} | |
], | |
"id": 439.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 464.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": { "class": "related-site d-flex" }, | |
"childNodes": [ | |
{ | |
"textContent": "\n ", | |
"id": 466.0, | |
"type": 3.0 | |
}, | |
{ | |
"attributes": { "class": "L-shaped-icon-container" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 468.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "L-shaped-icon" }, | |
"childNodes": [], | |
"id": 469.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 470.0 } | |
], | |
"id": 467.0, | |
"type": 2.0, | |
"tagName": "div" | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n\n ", | |
"id": 471.0 | |
}, | |
{ | |
"id": 472.0, | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://meta.stackoverflow.com/", | |
"class": " site-link js-gps-track d-flex gs8 gsx", | |
"data-id": "552", | |
"data-gps-track": "site.switch({ target_site:552, item_type:3 }),site_switcher.click({ item_type:4 })" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 473.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "favicon favicon-stackoverflowmeta site-icon flex--item", | |
"title": "Meta Stack Overflow" | |
}, | |
"childNodes": [], | |
"id": 474.0 | |
}, | |
{ "id": 475.0, "type": 3.0, "textContent": "\n " }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "flex--item fl1" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n Meta Stack Overflow\n ", | |
"id": 477.0 | |
} | |
], | |
"id": 476.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 478.0 } | |
] | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n\n ", | |
"id": 479.0 | |
} | |
], | |
"id": 465.0 | |
}, | |
{ "textContent": "\n ", "id": 480.0, "type": 3.0 } | |
], | |
"id": 437.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 481.0 } | |
], | |
"id": 396.0 | |
}, | |
{ "textContent": "\n\n ", "id": 482.0, "type": 3.0 }, | |
{ | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 484.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "h3", | |
"attributes": {}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 486.0 }, | |
{ | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackexchange.com/users/16566839/?tab=accounts" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "your communities", "id": 488.0 } | |
], | |
"id": 487.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 489.0 } | |
], | |
"id": 485.0 | |
}, | |
{ "type": 3.0, "textContent": "\n\n ", "id": 490.0 }, | |
{ | |
"attributes": { | |
"href": "https://stackoverflow.com/questions/54824036/useeffect-hook-with-socket-io-state-is-not-persistent-in-socket-handlers#", | |
"id": "edit-pinned-sites" | |
}, | |
"childNodes": [{ "textContent": "edit", "id": 492.0, "type": 3.0 }], | |
"id": 491.0, | |
"type": 2.0, | |
"tagName": "a" | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 493.0 }, | |
{ | |
"childNodes": [{ "textContent": "cancel", "id": 495.0, "type": 3.0 }], | |
"id": 494.0, | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"style": "display: none;", | |
"href": "https://stackoverflow.com/questions/54824036/useeffect-hook-with-socket-io-state-is-not-persistent-in-socket-handlers#", | |
"id": "cancel-pinned-sites" | |
} | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 496.0 } | |
], | |
"id": 483.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "header", "id": "your-communities-header" } | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 497.0 }, | |
{ | |
"childNodes": [ | |
{ "id": 499.0, "type": 3.0, "textContent": "\n\n " }, | |
{ | |
"attributes": { "class": "my-sites" }, | |
"childNodes": [ | |
{ "textContent": "\n ", "id": 501.0, "type": 3.0 }, | |
{ | |
"childNodes": [ | |
{ | |
"textContent": "\n ", | |
"id": 503.0, | |
"type": 3.0 | |
}, | |
{ | |
"attributes": { | |
"data-gps-track": "site.switch({ target_site:1, item_type:3 }),site_switcher.click({ item_type:1 })", | |
"href": "https://stackoverflow.com/", | |
"class": " site-link js-gps-track d-flex gs8 gsx", | |
"data-id": "1" | |
}, | |
"childNodes": [ | |
{ "textContent": "\n ", "id": 505.0, "type": 3.0 }, | |
{ | |
"attributes": { | |
"class": "favicon favicon-stackoverflow site-icon flex--item", | |
"title": "Stack Overflow" | |
}, | |
"childNodes": [], | |
"id": 506.0, | |
"type": 2.0, | |
"tagName": "div" | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 507.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "flex--item fl1" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n Stack Overflow\n ", | |
"id": 509.0 | |
} | |
], | |
"id": 508.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 510.0 }, | |
{ | |
"tagName": "span", | |
"attributes": { "class": "rep-score flex--item" }, | |
"childNodes": [ | |
{ "id": 512.0, "type": 3.0, "textContent": "3" } | |
], | |
"id": 511.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 513.0 } | |
], | |
"id": 504.0, | |
"type": 2.0, | |
"tagName": "a" | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n\n ", | |
"id": 514.0 | |
} | |
], | |
"id": 502.0, | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": {} | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 515.0 }, | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 517.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://meta.stackexchange.com/", | |
"class": " site-link js-gps-track d-flex gs8 gsx", | |
"data-id": "4", | |
"data-gps-track": "site.switch({ target_site:4, item_type:3 }),site_switcher.click({ item_type:1 })" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 519.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "favicon favicon-stackexchangemeta site-icon flex--item", | |
"title": "Meta Stack Exchange" | |
}, | |
"childNodes": [], | |
"id": 520.0 | |
}, | |
{ "textContent": "\n ", "id": 521.0, "type": 3.0 }, | |
{ | |
"attributes": { "class": "flex--item fl1" }, | |
"childNodes": [ | |
{ | |
"textContent": "\n Meta Stack Exchange\n ", | |
"id": 523.0, | |
"type": 3.0 | |
} | |
], | |
"id": 522.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 524.0 }, | |
{ | |
"attributes": { "class": "rep-score flex--item" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "1", "id": 526.0 } | |
], | |
"id": 525.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ "textContent": "\n ", "id": 527.0, "type": 3.0 } | |
], | |
"id": 518.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n\n ", | |
"id": 528.0 | |
} | |
], | |
"id": 516.0, | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": {} | |
}, | |
{ "id": 529.0, "type": 3.0, "textContent": "\n " } | |
], | |
"id": 500.0, | |
"type": 2.0, | |
"tagName": "ul" | |
}, | |
{ "textContent": "\n ", "id": 530.0, "type": 3.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "pinned-site-editor-container", | |
"style": "display: none;" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 532.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "input", | |
"attributes": { | |
"type": "hidden", | |
"name": "fkey", | |
"value": "4495aa5abfc783369a787315c34f7f955d12f17b520bdf98baaa7adcdc632489" | |
}, | |
"childNodes": [], | |
"id": 533.0 | |
}, | |
{ "id": 534.0, "type": 3.0, "textContent": "\n " }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "d-flex p12" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 536.0 | |
}, | |
{ | |
"id": 537.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "flex--item fl1 ps-relative" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 538.0 | |
}, | |
{ | |
"tagName": "input", | |
"attributes": { | |
"id": "js-site-search-txt", | |
"type": "text", | |
"class": "s-input s-input__sm w100 h100 site-filter-input", | |
"value": "", | |
"placeholder": "Add a Stack Exchange community" | |
}, | |
"childNodes": [], | |
"id": 539.0, | |
"type": 2.0 | |
}, | |
{ | |
"id": 540.0, | |
"type": 3.0, | |
"textContent": "\n " | |
}, | |
{ | |
"attributes": { | |
"class": "js-found-sites found-sites hmx1 l0 r0 ps-absolute overflow-y-auto" | |
}, | |
"childNodes": [], | |
"id": 541.0, | |
"type": 2.0, | |
"tagName": "ul" | |
}, | |
{ | |
"textContent": "\n ", | |
"id": 542.0, | |
"type": 3.0 | |
} | |
] | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 543.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "button", | |
"attributes": { | |
"id": "pin-site-btn", | |
"disabled": "disabled", | |
"class": "ml8 s-btn s-btn__sm", | |
"type": "submit" | |
}, | |
"childNodes": [{ "type": 3.0, "textContent": "Add", "id": 545.0 }], | |
"id": 544.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 546.0 | |
} | |
], | |
"id": 535.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 547.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "ul", | |
"attributes": { | |
"data-custom-list": "False", | |
"class": "pinned-site-list sortable" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 549.0 | |
} | |
], | |
"id": 548.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 550.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "d-flex p12 jc-end" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 552.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackoverflow.com/questions/54824036/useeffect-hook-with-socket-io-state-is-not-persistent-in-socket-handlers#", | |
"class": "flex--item s-btn s-btn__sm js-reset-pinned-sites" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "Reset", "id": 554.0 } | |
], | |
"id": 553.0 | |
}, | |
{ | |
"id": 555.0, | |
"type": 3.0, | |
"textContent": "\n " | |
}, | |
{ | |
"id": 556.0, | |
"type": 2.0, | |
"tagName": "button", | |
"attributes": { | |
"class": "ml8 flex--item s-btn s-btn__primary s-btn__sm", | |
"type": "submit", | |
"id": "save-pinned-sites-btn", | |
"disabled": "disabled" | |
}, | |
"childNodes": [{ "type": 3.0, "textContent": "Save", "id": 557.0 }] | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 558.0 | |
} | |
], | |
"id": 551.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 559.0 } | |
], | |
"id": 531.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 560.0 } | |
], | |
"id": 498.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "modal-content", "id": "your-communities-section" } | |
}, | |
{ "type": 3.0, "textContent": "\n\n ", "id": 561.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "header" }, | |
"childNodes": [ | |
{ "textContent": "\n ", "id": 563.0, "type": 3.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "h3", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { "href": "https://stackexchange.com/sites" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "more stack exchange communities", | |
"id": 566.0 | |
} | |
], | |
"id": 565.0 | |
}, | |
{ "textContent": "\n ", "id": 567.0, "type": 3.0 } | |
], | |
"id": 564.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 568.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { "class": "fr", "href": "https://stackoverflow.blog/" }, | |
"childNodes": [{ "type": 3.0, "textContent": "company blog", "id": 570.0 }], | |
"id": 569.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 571.0 } | |
], | |
"id": 562.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 572.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "modal-content" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 574.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "child-content" }, | |
"childNodes": [], | |
"id": 575.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 576.0 } | |
], | |
"id": 573.0 | |
}, | |
{ "type": 3.0, "textContent": " \n ", "id": 577.0 } | |
], | |
"id": 373.0 | |
}, | |
{ "type": 3.0, "textContent": "\n\n ", "id": 578.0 } | |
], | |
"id": 371.0, | |
"type": 2.0, | |
"tagName": "li" | |
}, | |
{ "id": 579.0, "type": 3.0, "textContent": "\n" } | |
] | |
}, | |
{ "textContent": "\n\n ", "id": 580.0, "type": 3.0 } | |
], | |
"id": 108.0 | |
}, | |
{ "type": 3.0, "textContent": "\n", "id": 581.0 } | |
], | |
"id": 106.0 | |
}, | |
{ "type": 3.0, "textContent": "\n\n ", "id": 582.0 }, | |
{ | |
"attributes": {}, | |
"childNodes": [{ "type": 3.0, "textContent": "SCRIPT_PLACEHOLDER", "id": 584.0 }], | |
"id": 583.0, | |
"type": 2.0, | |
"tagName": "script" | |
}, | |
{ "type": 3.0, "textContent": "\n\n\n\n\n\n ", "id": 585.0 }, | |
{ | |
"id": 586.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "container" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n \n\n\n", "id": 587.0 }, | |
{ | |
"attributes": { | |
"id": "left-sidebar", | |
"data-is-here-when": "md lg", | |
"class": "left-sidebar js-pinned-left-sidebar ps-relative" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 589.0 }, | |
{ | |
"attributes": { "class": "left-sidebar--sticky-container js-sticky-leftnav" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 591.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "nav", | |
"attributes": { "role": "navigation" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 593.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "ol", | |
"attributes": { "class": "nav-links" }, | |
"childNodes": [ | |
{ "id": 595.0, "type": 3.0, "textContent": "\n " }, | |
{ | |
"id": 596.0, | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": { "class": "" }, | |
"childNodes": [ | |
{ "id": 597.0, "type": 3.0, "textContent": "\n " }, | |
{ | |
"id": 598.0, | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"class": "pl8 js-gps-track nav-links--link", | |
"data-gps-track": "top_nav.click({is_current:false, location:2, destination:8})", | |
"aria-controls": "", | |
"data-controller": "", | |
"data-s-popover-placement": "right", | |
"data-s-popover-auto-show": "true", | |
"data-s-popover-hide-on-outside-click": "never", | |
"href": "https://stackoverflow.com/" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 599.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "d-flex ai-center" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 601.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "flex--item truncate" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n Home\n ", | |
"id": 603.0 | |
} | |
], | |
"id": 602.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 604.0 } | |
], | |
"id": 600.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 605.0 } | |
] | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 606.0 } | |
] | |
}, | |
{ "textContent": "\n ", "id": 607.0, "type": 3.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": {}, | |
"childNodes": [ | |
{ "textContent": "\n ", "id": 609.0, "type": 3.0 }, | |
{ | |
"id": 610.0, | |
"type": 2.0, | |
"tagName": "ol", | |
"attributes": { "class": "nav-links" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 611.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": { "class": "fs-fine tt-uppercase ml8 mt16 mb4 fc-light" }, | |
"childNodes": [{ "type": 3.0, "textContent": "Public", "id": 613.0 }], | |
"id": 612.0 | |
}, | |
{ "type": 3.0, "textContent": "\n\n ", "id": 614.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": { "class": " youarehere" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 616.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"id": "nav-questions", | |
"href": "https://stackoverflow.com/questions", | |
"data-s-popover-hide-on-outside-click": "never", | |
"class": "pl8 js-gps-track nav-links--link -link__with-icon", | |
"data-gps-track": "top_nav.click({is_current:true, location:2, destination:1})", | |
"aria-controls": "", | |
"data-controller": "", | |
"data-s-popover-placement": "right", | |
"data-s-popover-auto-show": "true" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n", "id": 618.0 }, | |
{ | |
"id": 619.0, | |
"type": 2.0, | |
"tagName": "svg", | |
"attributes": { | |
"class": "svg-icon iconGlobe", | |
"width": "18", | |
"height": "18", | |
"viewBox": "0 0 18 18", | |
"aria-hidden": "true" | |
}, | |
"childNodes": [ | |
{ | |
"attributes": { | |
"d": "M9 1C4.64 1 1 4.64 1 9c0 4.36 3.64 8 8 8 4.36 0 8-3.64 8-8 0-4.36-3.64-8-8-8ZM8 15.32a6.46 6.46 0 01-4.3-2.74 6.46 6.46 0 01-.93-5.01L7 11.68v.8c0 .88.12 1.32 1 1.32v1.52Zm5.72-2c-.2-.66-1-1.32-1.72-1.32h-1v-2c0-.44-.56-1-1-1H6V7h1c.44 0 1-.56 1-1V5h2c.88 0 1.4-.72 1.4-1.6v-.33a6.45 6.45 0 013.83 4.51 6.45 6.45 0 01-1.51 5.73v.01Z" | |
}, | |
"childNodes": [], | |
"id": 620.0, | |
"type": 2.0, | |
"tagName": "path" | |
} | |
], | |
"isSVG": true | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " ", | |
"id": 621.0 | |
}, | |
{ | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "Questions", "id": 623.0 } | |
], | |
"id": 622.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "-link--channel-name" } | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 624.0 } | |
], | |
"id": 617.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 625.0 } | |
], | |
"id": 615.0 | |
}, | |
{ "type": 3.0, "textContent": "\n\n ", "id": 626.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": { "class": "" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 628.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"id": "nav-tags", | |
"class": " js-gps-track nav-links--link", | |
"data-gps-track": "top_nav.click({is_current:false, location:2, destination:2})", | |
"data-s-popover-hide-on-outside-click": "never", | |
"href": "https://stackoverflow.com/tags", | |
"aria-controls": "", | |
"data-controller": "", | |
"data-s-popover-placement": "right", | |
"data-s-popover-auto-show": "true" | |
}, | |
"childNodes": [ | |
{ | |
"textContent": "\n ", | |
"id": 630.0, | |
"type": 3.0 | |
}, | |
{ | |
"tagName": "div", | |
"attributes": { "class": "d-flex ai-center" }, | |
"childNodes": [ | |
{ | |
"id": 632.0, | |
"type": 3.0, | |
"textContent": "\n " | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "flex--item truncate" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n Tags\n ", | |
"id": 634.0 | |
} | |
], | |
"id": 633.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 635.0 | |
} | |
], | |
"id": 631.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 636.0 } | |
], | |
"id": 629.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 637.0 } | |
], | |
"id": 627.0 | |
}, | |
{ "id": 638.0, "type": 3.0, "textContent": "\n " }, | |
{ | |
"tagName": "li", | |
"attributes": { "class": "" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 640.0 }, | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 642.0 | |
}, | |
{ | |
"tagName": "div", | |
"attributes": { "class": "d-flex ai-center" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 644.0 | |
}, | |
{ | |
"tagName": "div", | |
"attributes": { "class": "flex--item truncate" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n Users\n ", | |
"id": 646.0 | |
} | |
], | |
"id": 645.0, | |
"type": 2.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 647.0 | |
} | |
], | |
"id": 643.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 648.0 } | |
], | |
"id": 641.0, | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackoverflow.com/users", | |
"class": " js-gps-track nav-links--link", | |
"data-gps-track": "top_nav.click({is_current:false, location:2, destination:3})", | |
"data-controller": "", | |
"data-s-popover-placement": "right", | |
"id": "nav-users", | |
"aria-controls": "", | |
"data-s-popover-auto-show": "true", | |
"data-s-popover-hide-on-outside-click": "never" | |
} | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 649.0 } | |
], | |
"id": 639.0, | |
"type": 2.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 650.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": { "class": "d-flex ml8 mt16 mb4 jc-space-between" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 652.0 | |
}, | |
{ | |
"id": 653.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "flex--item tt-uppercase tt-uppercase fs-fine fc-light" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "Collectives", "id": 654.0 } | |
] | |
}, | |
{ | |
"id": 655.0, | |
"type": 3.0, | |
"textContent": "\n " | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "flex--item fs-fine fc-light" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 657.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "javascript:void(0)", | |
"data-controller": "s-popover", | |
"data-action": "s-popover#toggle", | |
"data-s-popover-placement": "top", | |
"data-s-popover-toggle-class": "is-selected", | |
"class": "s-link s-link__inherit mr8 js-gps-track", | |
"role": "button", | |
"aria-controls": "popover-discover-collectives", | |
"data-gps-track": "top_nav.click({is_current:false, location:2, destination:17})" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 659.0 | |
}, | |
{ | |
"attributes": { | |
"viewBox": "0 0 14 14", | |
"aria-hidden": "true", | |
"class": "svg-icon iconInfoSm", | |
"width": "14", | |
"height": "14" | |
}, | |
"childNodes": [ | |
{ | |
"tagName": "path", | |
"attributes": { | |
"d": "M7 1a6 6 0 110 12A6 6 0 017 1Zm1 10V6H6v5h2Zm0-6V3H6v2h2Z" | |
}, | |
"childNodes": [], | |
"id": 661.0, | |
"type": 2.0 | |
} | |
], | |
"isSVG": true, | |
"id": 660.0, | |
"type": 2.0, | |
"tagName": "svg" | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 662.0 | |
} | |
], | |
"id": 658.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 663.0 | |
} | |
], | |
"id": 656.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 664.0 | |
} | |
], | |
"id": 651.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 665.0 }, | |
{ | |
"id": 666.0, | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": { "class": "" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 667.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"data-controller": "", | |
"data-s-popover-placement": "right", | |
"data-s-popover-auto-show": "true", | |
"data-s-popover-hide-on-outside-click": "never", | |
"id": "nav-collective-discover", | |
"href": "https://stackoverflow.com/collectives", | |
"data-gps-track": "top_nav.click({is_current:false, location:2, destination:18})", | |
"aria-controls": "", | |
"class": "pl8 ai-center js-gps-track nav-links--link -link__with-icon" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n", "id": 669.0 }, | |
{ | |
"attributes": { | |
"width": "18", | |
"height": "18", | |
"viewBox": "0 0 18 18", | |
"aria-hidden": "true", | |
"class": "mt-auto fc-orange-400 svg-icon iconStarVerified" | |
}, | |
"childNodes": [ | |
{ | |
"childNodes": [], | |
"id": 671.0, | |
"type": 2.0, | |
"tagName": "path", | |
"attributes": { | |
"d": "M9.86.89a1.14 1.14 0 00-1.72 0l-.5.58c-.3.35-.79.48-1.23.33l-.72-.25a1.14 1.14 0 00-1.49.85l-.14.76c-.1.45-.45.8-.9.9l-.76.14c-.67.14-1.08.83-.85 1.49l.25.72c.15.44.02.92-.33 1.23l-.58.5a1.14 1.14 0 000 1.72l.58.5c.35.3.48.79.33 1.23l-.25.72c-.23.66.18 1.35.85 1.49l.76.14c.45.1.8.45.9.9l.14.76c.14.67.83 1.08 1.49.85l.72-.25c.44-.15.92-.02 1.23.33l.5.58c.46.52 1.26.52 1.72 0l.5-.58c.3-.35.79-.48 1.23-.33l.72.25c.66.23 1.35-.18 1.49-.85l.14-.76c.1-.45.45-.8.9-.9l.76-.14c.67-.14 1.08-.83.85-1.49l-.25-.72c-.15-.44-.02-.92.33-1.23l.58-.5c.52-.46.52-1.26 0-1.72l-.58-.5c-.35-.3-.48-.79-.33-1.23l.25-.72a1.14 1.14 0 00-.85-1.49l-.76-.14c-.45-.1-.8-.45-.9-.9l-.14-.76a1.14 1.14 0 00-1.49-.85l-.72.25c-.44.15-.92.02-1.23-.33l-.5-.58Zm-.49 2.67L10.6 6.6c.05.15.19.24.34.25l3.26.22c.36.03.5.48.23.71l-2.5 2.1a.4.4 0 00-.14.4l.8 3.16a.4.4 0 01-.6.44L9.2 12.13a.4.4 0 00-.42 0l-2.77 1.74a.4.4 0 01-.6-.44l.8-3.16a.4.4 0 00-.13-.4l-2.5-2.1a.4.4 0 01.22-.7l3.26-.23a.4.4 0 00.34-.25l1.22-3.03a.4.4 0 01.74 0Z" | |
} | |
} | |
], | |
"isSVG": true, | |
"id": 670.0, | |
"type": 2.0, | |
"tagName": "svg" | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " ", | |
"id": 672.0 | |
}, | |
{ | |
"id": 673.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "-link--channel-name" }, | |
"childNodes": [ | |
{ | |
"id": 674.0, | |
"type": 3.0, | |
"textContent": "Explore Collectives" | |
} | |
] | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 675.0 } | |
], | |
"id": 668.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 676.0 } | |
] | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 677.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": { "class": "fs-fine tt-uppercase ml8 mt16 mb4 fc-light" }, | |
"childNodes": [ | |
{ "id": 679.0, "type": 3.0, "textContent": "Find a Job" } | |
], | |
"id": 678.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 680.0 }, | |
{ | |
"attributes": { "class": "" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 682.0 }, | |
{ | |
"attributes": { | |
"class": " js-gps-track nav-links--link", | |
"data-gps-track": "top_nav.click({is_current:false, location:2, destination:6})", | |
"aria-controls": "", | |
"data-s-popover-placement": "right", | |
"id": "nav-jobs", | |
"href": "https://stackoverflow.com/jobs?so_medium=StackOverflow\u0026so_source=SiteNav", | |
"data-controller": "", | |
"data-s-popover-auto-show": "true", | |
"data-s-popover-hide-on-outside-click": "never" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 684.0 | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 686.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "flex--item truncate" }, | |
"childNodes": [ | |
{ | |
"textContent": "\n Jobs\n ", | |
"id": 688.0, | |
"type": 3.0 | |
} | |
], | |
"id": 687.0 | |
}, | |
{ | |
"id": 689.0, | |
"type": 3.0, | |
"textContent": "\n " | |
} | |
], | |
"id": 685.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "d-flex ai-center" } | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 690.0 } | |
], | |
"id": 683.0, | |
"type": 2.0, | |
"tagName": "a" | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 691.0 } | |
], | |
"id": 681.0, | |
"type": 2.0, | |
"tagName": "li" | |
}, | |
{ "textContent": "\n ", "id": 692.0, "type": 3.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": { "class": "" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 694.0 }, | |
{ | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackoverflow.com/jobs/companies?so_medium=StackOverflow\u0026so_source=SiteNav", | |
"class": " js-gps-track nav-links--link", | |
"aria-controls": "", | |
"data-s-popover-hide-on-outside-click": "never", | |
"id": "nav-companies", | |
"data-gps-track": "top_nav.click({is_current:false, location:2, destination:12})", | |
"data-controller": "", | |
"data-s-popover-placement": "right", | |
"data-s-popover-auto-show": "true" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 696.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "d-flex ai-center" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 698.0 | |
}, | |
{ | |
"id": 699.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "flex--item truncate" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n Companies\n ", | |
"id": 700.0 | |
} | |
] | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 701.0 | |
} | |
], | |
"id": 697.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 702.0 } | |
], | |
"id": 695.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 703.0 } | |
], | |
"id": 693.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 704.0 } | |
] | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 705.0 } | |
], | |
"id": 608.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 706.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": {}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 708.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "ol", | |
"attributes": { "class": "nav-links" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n \n\n", | |
"id": 710.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "js-freemium-cta ps-relative" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 712.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackoverflow.com/questions/54824036/useeffect-hook-with-socket-io-state-is-not-persistent-in-socket-handlers#", | |
"title": "Dismiss", | |
"class": "js-freemium-cta-dismiss ps-absolute tn8 r0 s-btn s-btn__muted s-btn__xs" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 714.0 }, | |
{ | |
"id": 715.0, | |
"type": 2.0, | |
"tagName": "svg", | |
"attributes": { | |
"aria-hidden": "true", | |
"class": "svg-icon iconClearSm", | |
"width": "14", | |
"height": "14", | |
"viewBox": "0 0 14 14" | |
}, | |
"childNodes": [ | |
{ | |
"tagName": "path", | |
"attributes": { | |
"d": "M12 3.41 10.59 2 7 5.59 3.41 2 2 3.41 5.59 7 2 10.59 3.41 12 7 8.41 10.59 12 12 10.59 8.41 7 12 3.41Z" | |
}, | |
"childNodes": [], | |
"id": 716.0, | |
"type": 2.0 | |
} | |
], | |
"isSVG": true | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 717.0 } | |
], | |
"id": 713.0 | |
}, | |
{ "type": 3.0, "textContent": "\n\n ", "id": 718.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "fs-fine tt-uppercase ml8 mt16 mb8 fc-light" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "Teams", "id": 720.0 } | |
], | |
"id": 719.0 | |
}, | |
{ "type": 3.0, "textContent": "\n\n ", "id": 721.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "bt bl bb bc-black-075 p12 pb6 fc-black-600 blr-sm overflow-hidden" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 723.0 }, | |
{ | |
"id": 724.0, | |
"type": 2.0, | |
"tagName": "strong", | |
"attributes": { "class": "fc-black-750 mb6" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Stack Overflow for Teams", | |
"id": 725.0 | |
} | |
] | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n – Collaborate and share knowledge with a private group.\n \n ", | |
"id": 726.0 | |
}, | |
{ | |
"childNodes": [], | |
"id": 727.0, | |
"type": 2.0, | |
"tagName": "img", | |
"attributes": { | |
"class": "wmx100 mx-auto my8 h-auto d-block", | |
"width": "139", | |
"height": "114", | |
"src": "https://cdn.sstatic.net/Img/teams/teams-illo-free-sidebar-promo.svg?v=47faa659a05e", | |
"alt": "" | |
} | |
}, | |
{ "textContent": "\n\n ", "id": 728.0, "type": 3.0 }, | |
{ | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackoverflow.com/teams/create/free?utm_source=so-owned\u0026utm_medium=side-bar\u0026utm_campaign=campaign-38\u0026utm_content=cta", | |
"class": "w100 s-btn s-btn__primary s-btn__xs js-gps-track", | |
"data-gps-track": "teams.create.left-sidenav.click({ Action: 6 })", | |
"data-ga": "[\"teams left navigation\",\"left nav free cta\",\"stackoverflow.com/teams/create/free\",null,null]" | |
}, | |
"childNodes": [ | |
{ | |
"textContent": "Create a free Team", | |
"id": 730.0, | |
"type": 3.0 | |
} | |
], | |
"id": 729.0, | |
"type": 2.0 | |
}, | |
{ "id": 731.0, "type": 3.0, "textContent": "\n " }, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackoverflow.com/teams", | |
"class": "w100 s-btn s-btn__muted s-btn__xs js-gps-track", | |
"data-gps-track": "teams.create.left-sidenav.click({ Action: 5 })", | |
"data-ga": "[\"teams left navigation\",\"left nav free cta\",\"stackoverflow.com/teams\",null,null]" | |
}, | |
"childNodes": [ | |
{ "textContent": "What is Teams?", "id": 733.0, "type": 3.0 } | |
], | |
"id": 732.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 734.0 } | |
], | |
"id": 722.0 | |
}, | |
{ "type": 3.0, "textContent": "\n", "id": 735.0 } | |
], | |
"id": 711.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 736.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "script", | |
"attributes": {}, | |
"childNodes": [ | |
{ "id": 738.0, "type": 3.0, "textContent": "SCRIPT_PLACEHOLDER" } | |
], | |
"id": 737.0 | |
}, | |
{ | |
"id": 739.0, | |
"type": 3.0, | |
"textContent": "\n\n " | |
}, | |
{ | |
"tagName": "li", | |
"attributes": { | |
"class": "d-flex ai-center jc-space-between ml8 mt24 mb4 js-create-team-cta d-none" | |
}, | |
"childNodes": [ | |
{ | |
"textContent": "\n ", | |
"id": 741.0, | |
"type": 3.0 | |
}, | |
{ | |
"id": 742.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "flex--item tt-uppercase fs-fine fc-light" | |
}, | |
"childNodes": [{ "type": 3.0, "textContent": "Teams", "id": 743.0 }] | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 744.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "flex--item" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 746.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"data-s-popover-toggle-class": "is-selected", | |
"class": "s-link p12 fc-black-500 h:fc-black-800 js-gps-track", | |
"role": "button", | |
"data-s-popover-placement": "bottom-start", | |
"data-action": "s-popover#toggle", | |
"data-gps-track": "teams.create.left-sidenav.click({ Action: ShowInfo })", | |
"data-ga": "[\"teams left navigation\",\"left nav show teams info\",null,null,null]", | |
"href": "javascript:void(0)", | |
"aria-controls": "popover-teams-create-cta", | |
"data-controller": "s-popover" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 748.0 | |
}, | |
{ | |
"id": 749.0, | |
"type": 2.0, | |
"tagName": "svg", | |
"attributes": { | |
"viewBox": "0 0 14 14", | |
"aria-hidden": "true", | |
"class": "svg-icon iconInfoSm", | |
"width": "14", | |
"height": "14" | |
}, | |
"childNodes": [ | |
{ | |
"type": 2.0, | |
"tagName": "path", | |
"attributes": { | |
"d": "M7 1a6 6 0 110 12A6 6 0 017 1Zm1 10V6H6v5h2Zm0-6V3H6v2h2Z" | |
}, | |
"childNodes": [], | |
"id": 750.0 | |
} | |
], | |
"isSVG": true | |
}, | |
{ | |
"id": 751.0, | |
"type": 3.0, | |
"textContent": "\n " | |
} | |
], | |
"id": 747.0 | |
}, | |
{ | |
"textContent": "\n\n ", | |
"id": 752.0, | |
"type": 3.0 | |
} | |
], | |
"id": 745.0 | |
}, | |
{ | |
"id": 753.0, | |
"type": 3.0, | |
"textContent": "\n " | |
} | |
], | |
"id": 740.0, | |
"type": 2.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 754.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": { "class": "ps-relative js-create-team-cta d-none" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 756.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackoverflow.com/teams/create/free?utm_source=so-owned\u0026utm_medium=side-bar\u0026utm_campaign=campaign-38\u0026utm_content=cta", | |
"class": "pl8 js-gps-track nav-links--link", | |
"title": "Stack Overflow for Teams is a private, secure spot for your organization's questions and answers.", | |
"data-gps-track": "teams.create.left-sidenav.click({ Action: FreemiumTeamsCreateClick })", | |
"data-ga": "[\"teams left navigation\",\"left nav team click\",\"stackoverflow.com/teams/create/free\",null,null]" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 758.0 | |
}, | |
{ | |
"tagName": "div", | |
"attributes": { "class": "d-flex ai-center" }, | |
"childNodes": [ | |
{ | |
"id": 760.0, | |
"type": 3.0, | |
"textContent": "\n " | |
}, | |
{ | |
"attributes": { | |
"class": "flex--item s-avatar va-middle bg-orange-400" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 762.0 | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"textContent": "\n ", | |
"id": 764.0, | |
"type": 3.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "svg", | |
"attributes": { | |
"height": "14", | |
"viewBox": "0 0 14 14", | |
"aria-hidden": "true", | |
"class": "svg-icon iconBriefcaseSm", | |
"width": "14" | |
}, | |
"childNodes": [ | |
{ | |
"attributes": { | |
"d": "M4 3a1 1 0 011-1h4a1 1 0 011 1v1h.5c.83 0 1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5h-7A1.5 1.5 0 012 10.5v-5C2 4.67 2.67 4 3.5 4H4V3Zm5 1V3H5v1h4Z" | |
}, | |
"childNodes": [], | |
"id": 766.0, | |
"type": 2.0, | |
"tagName": "path" | |
} | |
], | |
"isSVG": true, | |
"id": 765.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 767.0 | |
} | |
], | |
"id": 763.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "s-avatar--letter mtn1" } | |
}, | |
{ | |
"id": 768.0, | |
"type": 3.0, | |
"textContent": "\n " | |
}, | |
{ | |
"attributes": { | |
"aria-hidden": "true", | |
"class": "native s-avatar--badge svg-icon iconShieldXSm", | |
"width": "9", | |
"height": "10", | |
"viewBox": "0 0 9 10" | |
}, | |
"childNodes": [ | |
{ | |
"tagName": "path", | |
"attributes": { | |
"d": "M0 1.84 4.5 0 9 1.84v3.17C9 7.53 6.3 10 4.5 10 2.7 10 0 7.53 0 5.01V1.84Z", | |
"fill": "var(--white)" | |
}, | |
"childNodes": [], | |
"id": 770.0, | |
"type": 2.0 | |
}, | |
{ | |
"tagName": "path", | |
"attributes": { | |
"d": "M1 2.5 4.5 1 8 2.5v2.51C8 7.34 5.34 9 4.5 9 3.65 9 1 7.34 1 5.01V2.5Zm2.98 3.02L3.2 7h2.6l-.78-1.48a.4.4 0 01.15-.38c.34-.24.73-.7.73-1.14 0-.71-.5-1.23-1.41-1.23-.92 0-1.39.52-1.39 1.23 0 .44.4.9.73 1.14.12.08.18.23.15.38Z", | |
"fill": "var(--black-500)" | |
}, | |
"childNodes": [], | |
"id": 771.0, | |
"type": 2.0 | |
} | |
], | |
"isSVG": true, | |
"id": 769.0, | |
"type": 2.0, | |
"tagName": "svg" | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 772.0 | |
} | |
], | |
"id": 761.0, | |
"type": 2.0, | |
"tagName": "div" | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 773.0 | |
}, | |
{ | |
"tagName": "div", | |
"attributes": { "class": "flex--item pl6" }, | |
"childNodes": [ | |
{ | |
"textContent": "\n Create free Team\n ", | |
"id": 775.0, | |
"type": 3.0 | |
} | |
], | |
"id": 774.0, | |
"type": 2.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 776.0 | |
} | |
], | |
"id": 759.0, | |
"type": 2.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 777.0 | |
} | |
], | |
"id": 757.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 778.0 | |
} | |
], | |
"id": 755.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 779.0 } | |
], | |
"id": 709.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 780.0 } | |
], | |
"id": 707.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 781.0 } | |
], | |
"id": 594.0 | |
}, | |
{ "textContent": "\n ", "id": 782.0, "type": 3.0 } | |
], | |
"id": 592.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 783.0 } | |
], | |
"id": 590.0, | |
"type": 2.0, | |
"tagName": "div" | |
}, | |
{ "type": 3.0, "textContent": "\n\n ", "id": 784.0 }, | |
{ | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 786.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "s-popover--arrow" }, | |
"childNodes": [], | |
"id": 787.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 788.0 }, | |
{ | |
"id": 789.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": {}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 790.0 }, | |
{ | |
"childNodes": [ | |
{ | |
"type": 2.0, | |
"tagName": "path", | |
"attributes": { | |
"d": "M25.5 7a2.5 2.5 0 100-5 2.5 2.5 0 0 0 0 5zM14 18.25c0-.69.56-1.25 1.25-1.25h22.5c.69 0 1.25.56 1.25 1.25V37.5a1 1 0 01-1.6.8l-4.07-3.05a1.25 1.25 0 00-.75-.25H15.25c-.69 0-1.25-.56-1.25-1.25v-15.5zM7 24.5a2.5 2.5 0 11-5 0 2.5 2.5 0 0 1 5 0zM25.5 48a2.5 2.5 0 100-5 2.5 2.5 0 0 0 0 5zM48 24.5a2.5 2.5 0 11-5 0 2.5 2.5 0 0 1 5 0z", | |
"opacity": ".2" | |
}, | |
"childNodes": [], | |
"id": 792.0 | |
}, | |
{ | |
"id": 793.0, | |
"type": 2.0, | |
"tagName": "path", | |
"attributes": { | |
"d": "M21 3.5a3.5 3.5 0 117 0 3.5 3.5 0 0 1-7 0zM24.5 2a1.5 1.5 0 100 3 1.5 1.5 0 0 0 0-3zM0 23.5a3.5 3.5 0 117 0 3.5 3.5 0 0 1-7 0zM3.5 22a1.5 1.5 0 100 3 1.5 1.5 0 0 0 0-3zM21 44.5a3.5 3.5 0 117 0 3.5 3.5 0 0 1-7 0zm3.5-1.5a1.5 1.5 0 100 3 1.5 1.5 0 0 0 0-3zm20-23a3.5 3.5 0 100 7 3.5 3.5 0 0 0 0-7zM43 23.5a1.5 1.5 0 113 0 1.5 1.5 0 0 1-3 0zm-23.23-3.14a1 1 0 01-.13 1.4l-2.08 1.74 2.08 1.73a1 1 0 11-1.28 1.54l-2.42-2.02a1.63 1.63 0 010-2.5l2.42-2.02a1 1 0 011.4.13zm7.59 1.41a1 1 0 111.28-1.54l2.42 2.02c.78.65.78 1.85 0 2.5l-2.42 2.02a1 1 0 11-1.28-1.54l2.08-1.73-2.08-1.73zM24.12 18a1 1 0 01.87 1.12l-1 8a1 1 0 11-1.98-.24l1-8a1 1 0 011.11-.87zm-11.87-5C11.01 13 10 14 10 15.25v15.5c0 1.24 1 2.25 2.25 2.25h17.33c.06 0 .11.02.15.05l4.07 3.05a2 2 0 003.2-1.6V15.25c0-1.24-1-2.25-2.25-2.25h-22.5zM12 15.25c0-.14.11-.25.25-.25h22.5c.14 0 .25.11.25.25V34.5l-4.07-3.05a2.2 2.2 0 00-1.35-.45H12.25a.25.25 0 01-.25-.25v-15.5zm7.24-10.68a1 1 0 10-.48-1.94A22.04 22.04 0 002.91 17.7a1 1 0 101.92.58 20.04 20.04 0 0 1 14.4-13.72zm11.05-1.66a1 1 0 00-.58 1.92c6.45 1.92 11.54 7 13.46 13.46a1 1 0 101.92-.58 22.05 22.05 0 0 0-14.8-14.8zM4.57 28.76a1 1 0 00-1.94.48 22.03 22.03 0 0 0 16.13 16.13 1 1 0 1 0 .48-1.94A20.03 20.03 0 014.57 28.76zm40.8.48a1 1 0 10-1.94-.48 20.04 20.04 0 0 1-13.72 14.41 1 1 0 0 0 .58 1.92 22.04 22.04 0 0 0 15.08-15.85z" | |
}, | |
"childNodes": [] | |
} | |
], | |
"isSVG": true, | |
"id": 791.0, | |
"type": 2.0, | |
"tagName": "svg", | |
"attributes": { | |
"aria-hidden": "true", | |
"class": "fc-orange-500 float-right ml24 svg-spot spotCollective", | |
"width": "48", | |
"height": "48", | |
"viewBox": "0 0 48 48" | |
} | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 794.0 }, | |
{ | |
"attributes": { "class": "pt4 fw-bold" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "Collectives on Stack Overflow", "id": 796.0 } | |
], | |
"id": 795.0, | |
"type": 2.0, | |
"tagName": "div" | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 797.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "p", | |
"attributes": { "class": "my16 fs-caption fc-medium" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Find centralized, trusted content and collaborate around the technologies you use most.", | |
"id": 799.0 | |
} | |
], | |
"id": 798.0 | |
}, | |
{ "id": 800.0, "type": 3.0, "textContent": "\n " }, | |
{ | |
"attributes": { | |
"href": "https://stackoverflow.com/collectives", | |
"class": "js-gps-track s-btn s-btn__primary s-btn__xs", | |
"data-gps-track": "top_nav.click({is_current:false, location:2, destination:18})" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n Learn more\n ", | |
"id": 802.0 | |
} | |
], | |
"id": 801.0, | |
"type": 2.0, | |
"tagName": "a" | |
}, | |
{ "id": 803.0, "type": 3.0, "textContent": "\n " } | |
] | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 804.0 } | |
], | |
"id": 785.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"id": "popover-discover-collectives", | |
"role": "menu", | |
"aria-hidden": "true", | |
"class": "s-popover ws2" | |
} | |
}, | |
{ "id": 805.0, "type": 3.0, "textContent": "\n\n\n " }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"role": "menu", | |
"aria-hidden": "true", | |
"class": "s-popover", | |
"id": "popover-teams-create-cta" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 807.0 }, | |
{ | |
"tagName": "div", | |
"attributes": { "class": "s-popover--arrow" }, | |
"childNodes": [], | |
"id": 808.0, | |
"type": 2.0 | |
}, | |
{ "id": 809.0, "type": 3.0, "textContent": "\n\n " }, | |
{ | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 811.0 }, | |
{ | |
"tagName": "p", | |
"attributes": { "class": "mb2" }, | |
"childNodes": [ | |
{ | |
"type": 2.0, | |
"tagName": "strong", | |
"attributes": {}, | |
"childNodes": [{ "type": 3.0, "textContent": "Teams", "id": 814.0 }], | |
"id": 813.0 | |
} | |
], | |
"id": 812.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 815.0 }, | |
{ | |
"id": 816.0, | |
"type": 2.0, | |
"tagName": "p", | |
"attributes": { "class": "mb12 fs-caption fc-black-400" }, | |
"childNodes": [{ "type": 3.0, "textContent": "Q\u0026A for work", "id": 817.0 }] | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 818.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "p", | |
"attributes": { "class": "mb12 fs-caption fc-medium" }, | |
"childNodes": [ | |
{ | |
"id": 820.0, | |
"type": 3.0, | |
"textContent": "Connect and share knowledge within a single location that is structured and easy to search." | |
} | |
], | |
"id": 819.0 | |
}, | |
{ "id": 821.0, "type": 3.0, "textContent": "\n " }, | |
{ | |
"attributes": { | |
"href": "https://stackoverflow.com/teams", | |
"class": "js-gps-track s-btn s-btn__primary s-btn__xs", | |
"data-gps-track": "teams.create.left-sidenav.click({ Action: CtaClick })", | |
"data-ga": "[\"teams left navigation\",\"left nav cta\",\"stackoverflow.com/teams\",null,null]" | |
}, | |
"childNodes": [ | |
{ | |
"textContent": "\n Learn more\n ", | |
"id": 823.0, | |
"type": 3.0 | |
} | |
], | |
"id": 822.0, | |
"type": 2.0, | |
"tagName": "a" | |
}, | |
{ "textContent": "\n ", "id": 824.0, "type": 3.0 } | |
], | |
"id": 810.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "ps-relative overflow-hidden" } | |
}, | |
{ "type": 3.0, "textContent": "\n\n ", "id": 825.0 }, | |
{ | |
"id": 826.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "ps-absolute t8 r8" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 827.0 }, | |
{ | |
"attributes": { | |
"aria-hidden": "true", | |
"class": "fc-orange-500 svg-spot spotPeople", | |
"width": "48", | |
"height": "48", | |
"viewBox": "0 0 48 48" | |
}, | |
"childNodes": [ | |
{ | |
"type": 2.0, | |
"tagName": "path", | |
"attributes": { | |
"d": "M13.5 28a4.5 4.5 0 100-9 4.5 4.5 0 0 0 0 9zM7 30a1 1 0 011-1h11a1 1 0 011 1v5h11v-5a1 1 0 011-1h12a1 1 0 011 1v10a2 2 0 01-2 2H33v5a1 1 0 01-1 1H20a1 1 0 01-1-1v-5H8a1 1 0 01-1-1V30zm25-6.5a4.5 4.5 0 109 0 4.5 4.5 0 0 0-9 0zM24.5 34a4.5 4.5 0 100-9 4.5 4.5 0 0 0 0 9z", | |
"opacity": ".2" | |
}, | |
"childNodes": [], | |
"id": 829.0 | |
}, | |
{ | |
"id": 830.0, | |
"type": 2.0, | |
"tagName": "path", | |
"attributes": { | |
"d": "M16.4 26.08A6 6 0 107.53 26C5.64 26.06 4 27.52 4 29.45V40a1 1 0 001 1h9a1 1 0 100-2h-4v-7a1 1 0 10-2 0v7H6v-9.55c0-.73.67-1.45 1.64-1.45H16a1 1 0 00.4-1.92zM12 18a4 4 0 110 8 4 4 0 0 1 0-8zm16.47 14a6 6 0 10-8.94 0A3.6 3.6 0 0016 35.5V46a1 1 0 001 1h14a1 1 0 001-1V35.5c0-1.94-1.64-3.42-3.53-3.5zM20 28a4 4 0 118 0 4 4 0 0 1-8 0zm-.3 6h8.6c1 0 1.7.75 1.7 1.5V45h-2v-7a1 1 0 10-2 0v7h-4v-7a1 1 0 10-2 0v7h-2v-9.5c0-.75.7-1.5 1.7-1.5zM42 22c0 1.54-.58 2.94-1.53 4A3.5 3.5 0 0144 29.45V40a1 1 0 01-1 1h-9a1 1 0 110-2h4v-7a1 1 0 112 0v7h2v-9.55A1.5 1.5 0 0040.48 28H32a1 1 0 01-.4-1.92A6 6 0 1142 22zm-2 0a4 4 0 10-8 0 4 4 0 0 0 8 0z" | |
}, | |
"childNodes": [] | |
}, | |
{ | |
"id": 831.0, | |
"type": 2.0, | |
"tagName": "path", | |
"attributes": { | |
"opacity": ".35", | |
"d": "M17 10a1 1 0 011-1h12a1 1 0 110 2H18a1 1 0 01-1-1zm1-5a1 1 0 100 2h12a1 1 0 100-2H18zm-4-4a1 1 0 00-1 1v12a1 1 0 001 1h5.09l4.2 4.2a1 1 0 001.46-.04l3.7-4.16H34a1 1 0 001-1V2a1 1 0 00-1-1H14zm1 12V3h18v10h-5a1 1 0 00-.75.34l-3.3 3.7-3.74-3.75a1 1 0 00-.71-.29H15z" | |
}, | |
"childNodes": [] | |
} | |
], | |
"isSVG": true, | |
"id": 828.0, | |
"type": 2.0, | |
"tagName": "svg" | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 832.0 } | |
] | |
}, | |
{ "id": 833.0, "type": 3.0, "textContent": "\n " } | |
], | |
"id": 806.0 | |
}, | |
{ "type": 3.0, "textContent": "\n\n", "id": 834.0 } | |
], | |
"id": 588.0, | |
"type": 2.0, | |
"tagName": "div" | |
}, | |
{ "type": 3.0, "textContent": "\n\n\n\n\n ", "id": 835.0 }, | |
{ | |
"attributes": { "id": "content", "class": "snippet-hidden" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n\n \n", "id": 837.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"itemprop": "mainEntity", | |
"itemscope": "", | |
"itemtype": "https://schema.org/Question" | |
}, | |
"childNodes": [ | |
{ "id": 839.0, "type": 3.0, "textContent": "\n " }, | |
{ | |
"type": 2.0, | |
"tagName": "link", | |
"attributes": { | |
"itemprop": "image", | |
"href": "https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a" | |
}, | |
"childNodes": [], | |
"id": 840.0 | |
}, | |
{ "type": 3.0, "textContent": "\n\n ", "id": 841.0 }, | |
{ | |
"id": 842.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "inner-content clearfix" }, | |
"childNodes": [ | |
{ "textContent": "\n\n \n\n ", "id": 843.0, "type": 3.0 }, | |
{ | |
"id": 844.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "id": "question-header", "class": "d-flex sm:fd-column" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 845.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "h1", | |
"attributes": { | |
"itemprop": "name", | |
"class": "fs-headline1 ow-break-word mb8 flex--item fl1" | |
}, | |
"childNodes": [ | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "UseEffect hook with socket.io state is not persistent in socket handlers", | |
"id": 848.0 | |
} | |
], | |
"id": 847.0, | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackoverflow.com/questions/54824036/useeffect-hook-with-socket-io-state-is-not-persistent-in-socket-handlers", | |
"class": "question-hyperlink" | |
} | |
} | |
], | |
"id": 846.0 | |
}, | |
{ "id": 849.0, "type": 3.0, "textContent": "\n " }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "ml12 aside-cta flex--item print:d-none sm:ml0 sm:mb12 sm:order-first sm:as-end" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 851.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackoverflow.com/questions/ask", | |
"class": "ws-nowrap s-btn s-btn__primary" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n Ask Question\n ", | |
"id": 853.0 | |
} | |
], | |
"id": 852.0 | |
}, | |
{ "type": 3.0, "textContent": "\n\n ", "id": 854.0 } | |
], | |
"id": 850.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 855.0 } | |
] | |
}, | |
{ "id": 856.0, "type": 3.0, "textContent": "\n " }, | |
{ | |
"id": 857.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "d-flex fw-wrap pb8 mb16 bb bc-black-075" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 858.0 }, | |
{ | |
"tagName": "div", | |
"attributes": { | |
"class": "flex--item ws-nowrap mr16 mb8", | |
"title": "2019-02-22 09:34:48Z" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 860.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "fc-light mr2" }, | |
"childNodes": [{ "type": 3.0, "textContent": "Asked", "id": 862.0 }], | |
"id": 861.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 863.0 }, | |
{ | |
"id": 864.0, | |
"type": 2.0, | |
"tagName": "time", | |
"attributes": { | |
"itemprop": "dateCreated", | |
"datetime": "2019-02-22T09:34:48" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "2 years, 7 months ago", "id": 865.0 } | |
] | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 866.0 } | |
], | |
"id": 859.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 867.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "flex--item ws-nowrap mr16 mb8" }, | |
"childNodes": [ | |
{ "textContent": "\n ", "id": 869.0, "type": 3.0 }, | |
{ | |
"id": 870.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "fc-light mr2" }, | |
"childNodes": [{ "type": 3.0, "textContent": "Active", "id": 871.0 }] | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 872.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackoverflow.com/questions/54824036/useeffect-hook-with-socket-io-state-is-not-persistent-in-socket-handlers?lastactivity", | |
"class": "s-link s-link__inherit", | |
"title": "2021-08-19 13:09:51Z" | |
}, | |
"childNodes": [{ "type": 3.0, "textContent": "1 month ago", "id": 874.0 }], | |
"id": 873.0 | |
}, | |
{ "id": 875.0, "type": 3.0, "textContent": "\n " } | |
], | |
"id": 868.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 876.0 }, | |
{ | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 878.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "fc-light mr2" }, | |
"childNodes": [{ "id": 880.0, "type": 3.0, "textContent": "Viewed" }], | |
"id": 879.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n 15k times\n ", | |
"id": 881.0 | |
} | |
], | |
"id": 877.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "flex--item ws-nowrap mb8", | |
"title": "Viewed 15,043 times" | |
} | |
}, | |
{ "textContent": "\n ", "id": 882.0, "type": 3.0 } | |
] | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 883.0 }, | |
{ | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n\n \n", "id": 885.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "question", | |
"data-questionid": "54824036", | |
"data-position-on-page": "0", | |
"data-score": "26", | |
"id": "question" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 887.0 }, | |
{ | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "isStyle": true, "id": 889.0 } | |
], | |
"id": 888.0, | |
"type": 2.0, | |
"tagName": "style", | |
"attributes": {} | |
}, | |
{ "type": 3.0, "textContent": "\n", "id": 890.0 }, | |
{ | |
"attributes": { "class": "js-zone-container zone-container-main" }, | |
"childNodes": [ | |
{ "textContent": "\n ", "id": 892.0, "type": 3.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"style": "min-height: auto; height: auto; display: none;", | |
"id": "dfp-tlb", | |
"class": "everyonelovesstackoverflow everyoneloves__top-leaderboard everyoneloves__leaderboard" | |
}, | |
"childNodes": [], | |
"id": 893.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 894.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "js-report-ad-button-container ", | |
"style": "width: 728px" | |
}, | |
"childNodes": [], | |
"id": 895.0 | |
}, | |
{ "type": 3.0, "textContent": "\n", "id": 896.0 } | |
], | |
"id": 891.0, | |
"type": 2.0, | |
"tagName": "div" | |
}, | |
{ "type": 3.0, "textContent": "\n\n ", "id": 897.0 }, | |
{ | |
"id": 898.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "post-layout" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 899.0 }, | |
{ | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 901.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "js-voting-container d-flex jc-center fd-column ai-stretch gs4 fc-black-200", | |
"data-post-id": "54824036" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 903.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "button", | |
"attributes": { | |
"aria-pressed": "false", | |
"aria-label": "Up vote", | |
"data-selected-classes": "fc-theme-primary", | |
"data-unselected-classes": "", | |
"aria-describedby": "--stacks-s-tooltip-01trr5e5", | |
"class": "js-vote-up-btn flex--item s-btn s-btn__unset c-pointer ", | |
"data-controller": "s-tooltip", | |
"data-s-tooltip-placement": "right" | |
}, | |
"childNodes": [ | |
{ "id": 905.0, "type": 3.0, "textContent": "\n " }, | |
{ | |
"type": 2.0, | |
"tagName": "svg", | |
"attributes": { | |
"class": "svg-icon iconArrowUpLg", | |
"width": "36", | |
"height": "36", | |
"viewBox": "0 0 36 36", | |
"aria-hidden": "true" | |
}, | |
"childNodes": [ | |
{ | |
"id": 907.0, | |
"type": 2.0, | |
"tagName": "path", | |
"attributes": { "d": "M2 26h32L18 10 2 26Z" }, | |
"childNodes": [] | |
} | |
], | |
"isSVG": true, | |
"id": 906.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 908.0 } | |
], | |
"id": 904.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"id": "--stacks-s-tooltip-01trr5e5", | |
"class": "s-popover s-popover__tooltip pe-none", | |
"aria-hidden": "true", | |
"role": "tooltip" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "This question shows research effort; it is useful and clear", | |
"id": 910.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "s-popover--arrow" }, | |
"childNodes": [], | |
"id": 911.0 | |
} | |
], | |
"id": 909.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 912.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "js-vote-count flex--item d-flex fd-column ai-center fc-black-500 fs-title", | |
"itemprop": "upvoteCount", | |
"data-value": "26" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n 26\n ", | |
"id": 914.0 | |
} | |
], | |
"id": 913.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 915.0 }, | |
{ | |
"tagName": "button", | |
"attributes": { | |
"aria-pressed": "false", | |
"aria-label": "Down vote", | |
"data-selected-classes": "fc-theme-primary", | |
"data-unselected-classes": "", | |
"aria-describedby": "--stacks-s-tooltip-bv5idbtu", | |
"class": "js-vote-down-btn flex--item s-btn s-btn__unset c-pointer ", | |
"data-controller": "s-tooltip", | |
"data-s-tooltip-placement": "right" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 917.0 }, | |
{ | |
"isSVG": true, | |
"id": 918.0, | |
"type": 2.0, | |
"tagName": "svg", | |
"attributes": { | |
"aria-hidden": "true", | |
"class": "svg-icon iconArrowDownLg", | |
"width": "36", | |
"height": "36", | |
"viewBox": "0 0 36 36" | |
}, | |
"childNodes": [ | |
{ | |
"type": 2.0, | |
"tagName": "path", | |
"attributes": { "d": "M2 10h32L18 26 2 10Z" }, | |
"childNodes": [], | |
"id": 919.0 | |
} | |
] | |
}, | |
{ "id": 920.0, "type": 3.0, "textContent": "\n " } | |
], | |
"id": 916.0, | |
"type": 2.0 | |
}, | |
{ | |
"attributes": { | |
"id": "--stacks-s-tooltip-bv5idbtu", | |
"class": "s-popover s-popover__tooltip pe-none", | |
"aria-hidden": "true", | |
"role": "tooltip" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "This question does not show any research effort; it is unclear or not useful", | |
"id": 922.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "s-popover--arrow" }, | |
"childNodes": [], | |
"id": 923.0 | |
} | |
], | |
"id": 921.0, | |
"type": 2.0, | |
"tagName": "div" | |
}, | |
{ "id": 924.0, "type": 3.0, "textContent": "\n\n " }, | |
{ | |
"attributes": { | |
"class": "js-bookmark-btn s-btn s-btn__unset c-pointer py4 js-gps-track", | |
"data-controller": "s-tooltip", | |
"data-s-tooltip-placement": "right", | |
"aria-pressed": "false", | |
"aria-label": "Bookmark (9)", | |
"data-selected-classes": "fc-yellow-600", | |
"data-gps-track": "post.click({ item: 1, priv: -1, post_type: 1 })", | |
"aria-describedby": "--stacks-s-tooltip-nlmipn85" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 926.0 }, | |
{ | |
"attributes": { | |
"class": "svg-icon iconBookmark", | |
"width": "18", | |
"height": "18", | |
"viewBox": "0 0 18 18", | |
"aria-hidden": "true" | |
}, | |
"childNodes": [ | |
{ | |
"type": 2.0, | |
"tagName": "path", | |
"attributes": { | |
"d": "M6 1a2 2 0 00-2 2v14l5-4 5 4V3a2 2 0 00-2-2H6Zm3.9 3.83h2.9l-2.35 1.7.9 2.77L9 7.59l-2.35 1.7.9-2.76-2.35-1.7h2.9L9 2.06l.9 2.77Z" | |
}, | |
"childNodes": [], | |
"id": 928.0 | |
} | |
], | |
"isSVG": true, | |
"id": 927.0, | |
"type": 2.0, | |
"tagName": "svg" | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 929.0 }, | |
{ | |
"id": 930.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "js-bookmark-count mt4", | |
"data-value": "9" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "9", "id": 931.0 } | |
] | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 932.0 } | |
], | |
"id": 925.0, | |
"type": 2.0, | |
"tagName": "button" | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"id": 934.0, | |
"type": 3.0, | |
"textContent": "Bookmark this question." | |
}, | |
{ | |
"childNodes": [], | |
"id": 935.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "s-popover--arrow" } | |
} | |
], | |
"id": 933.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"id": "--stacks-s-tooltip-nlmipn85", | |
"class": "s-popover s-popover__tooltip pe-none", | |
"aria-hidden": "true", | |
"role": "tooltip" | |
} | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n \n\n \n ", | |
"id": 936.0 | |
}, | |
{ | |
"id": 937.0, | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"aria-label": "Timeline", | |
"aria-describedby": "--stacks-s-tooltip-u3tmhffb", | |
"class": "js-post-issue flex--item s-btn s-btn__unset c-pointer py6 mx-auto", | |
"href": "https://stackoverflow.com/posts/54824036/timeline", | |
"data-shortcut": "T", | |
"data-ks-title": "timeline", | |
"data-controller": "s-tooltip", | |
"data-s-tooltip-placement": "right" | |
}, | |
"childNodes": [ | |
{ | |
"attributes": { | |
"aria-hidden": "true", | |
"class": "mln2 mr0 svg-icon iconHistory", | |
"width": "19", | |
"height": "18", | |
"viewBox": "0 0 19 18" | |
}, | |
"childNodes": [ | |
{ | |
"tagName": "path", | |
"attributes": { | |
"d": "M3 9a8 8 0 113.73 6.77L8.2 14.3A6 6 0 105 9l3.01-.01-4 4-4-4h3L3 9Zm7-4h1.01L11 9.36l3.22 2.1-.6.93L10 10V5Z" | |
}, | |
"childNodes": [], | |
"id": 939.0, | |
"type": 2.0 | |
} | |
], | |
"isSVG": true, | |
"id": 938.0, | |
"type": 2.0, | |
"tagName": "svg" | |
} | |
] | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"id": "--stacks-s-tooltip-u3tmhffb", | |
"class": "s-popover s-popover__tooltip pe-none", | |
"aria-hidden": "true", | |
"role": "tooltip" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Show activity on this post.", | |
"id": 941.0 | |
}, | |
{ | |
"childNodes": [], | |
"id": 942.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "s-popover--arrow" } | |
} | |
], | |
"id": 940.0 | |
}, | |
{ "type": 3.0, "textContent": "\n\n", "id": 943.0 } | |
], | |
"id": 902.0 | |
}, | |
{ "id": 944.0, "type": 3.0, "textContent": "\n\n " } | |
], | |
"id": 900.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "votecell post-layout--left" } | |
}, | |
{ "textContent": "\n\n \n\n", "id": 945.0, "type": 3.0 }, | |
{ | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n \n ", "id": 947.0 }, | |
{ | |
"childNodes": [ | |
{ | |
"id": 949.0, | |
"type": 3.0, | |
"textContent": "\n \n" | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"id": 951.0, | |
"type": 3.0, | |
"textContent": "I have the following react component" | |
} | |
], | |
"id": 950.0, | |
"type": 2.0, | |
"tagName": "p", | |
"attributes": {} | |
}, | |
{ "type": 3.0, "textContent": "\n\n", "id": 952.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "pre", | |
"attributes": { "class": "lang-js s-code-block" }, | |
"childNodes": [ | |
{ | |
"id": 954.0, | |
"type": 2.0, | |
"tagName": "code", | |
"attributes": { "class": "hljs language-javascript" }, | |
"childNodes": [ | |
{ | |
"id": 955.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "function", | |
"id": 956.0 | |
} | |
] | |
}, | |
{ "id": 957.0, "type": 3.0, "textContent": " " }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "ConferencingRoom", | |
"id": 959.0 | |
} | |
], | |
"id": 958.0 | |
}, | |
{ "type": 3.0, "textContent": "(", "id": 960.0 }, | |
{ | |
"attributes": { "class": "hljs-params" }, | |
"childNodes": [], | |
"id": 961.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ "type": 3.0, "textContent": ") {\n ", "id": 962.0 }, | |
{ | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "const", "id": 964.0 } | |
], | |
"id": 963.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" } | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " [participants, setParticipants] = ", | |
"id": 965.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "useState", | |
"id": 967.0 | |
} | |
], | |
"id": 966.0 | |
}, | |
{ "type": 3.0, "textContent": "({})\n ", "id": 968.0 }, | |
{ | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "console", "id": 970.0 } | |
], | |
"id": 969.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-variable language_" } | |
}, | |
{ "type": 3.0, "textContent": ".", "id": 971.0 }, | |
{ | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ "id": 973.0, "type": 3.0, "textContent": "log" } | |
], | |
"id": 972.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ "type": 3.0, "textContent": "(", "id": 974.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-string" }, | |
"childNodes": [ | |
{ | |
"id": 976.0, | |
"type": 3.0, | |
"textContent": "'Participants -\u003e '" | |
} | |
], | |
"id": 975.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ", participants)\n\n ", | |
"id": 977.0 | |
}, | |
{ | |
"id": 978.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "useEffect", | |
"id": 979.0 | |
} | |
] | |
}, | |
{ "type": 3.0, "textContent": "(", "id": 980.0 }, | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "() =\u003e", | |
"id": 982.0 | |
} | |
], | |
"id": 981.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-function" } | |
}, | |
{ | |
"textContent": " {\n ", | |
"id": 983.0, | |
"type": 3.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-comment" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "// messages handlers", | |
"id": 985.0 | |
} | |
], | |
"id": 984.0 | |
}, | |
{ | |
"textContent": "\n socket.", | |
"id": 986.0, | |
"type": 3.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ "id": 988.0, "type": 3.0, "textContent": "on" } | |
], | |
"id": 987.0 | |
}, | |
{ "textContent": "(", "id": 989.0, "type": 3.0 }, | |
{ | |
"tagName": "span", | |
"attributes": { "class": "hljs-string" }, | |
"childNodes": [ | |
{ | |
"textContent": "'message'", | |
"id": 991.0, | |
"type": 3.0 | |
} | |
], | |
"id": 990.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": ", ", "id": 992.0 }, | |
{ | |
"childNodes": [ | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-params" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "message", | |
"id": 995.0 | |
} | |
], | |
"id": 994.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " =\u003e", | |
"id": 996.0 | |
} | |
], | |
"id": 993.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-function" } | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " {\n ", | |
"id": 997.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-variable language_" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "console", "id": 999.0 } | |
], | |
"id": 998.0 | |
}, | |
{ "type": 3.0, "textContent": ".", "id": 1000.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "log", "id": 1002.0 } | |
], | |
"id": 1001.0 | |
}, | |
{ "type": 3.0, "textContent": "(", "id": 1003.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-string" }, | |
"childNodes": [ | |
{ | |
"textContent": "'Message received: '", | |
"id": 1005.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1004.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " + message.", | |
"id": 1006.0 | |
}, | |
{ | |
"attributes": { "class": "hljs-property" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "event", "id": 1008.0 } | |
], | |
"id": 1007.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ")\n ", | |
"id": 1009.0 | |
}, | |
{ | |
"id": 1010.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" }, | |
"childNodes": [ | |
{ "textContent": "switch", "id": 1011.0, "type": 3.0 } | |
] | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " (message.", | |
"id": 1012.0 | |
}, | |
{ | |
"tagName": "span", | |
"attributes": { "class": "hljs-property" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "event", "id": 1014.0 } | |
], | |
"id": 1013.0, | |
"type": 2.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ") {\n ", | |
"id": 1015.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "case", "id": 1017.0 } | |
], | |
"id": 1016.0 | |
}, | |
{ "textContent": " ", "id": 1018.0, "type": 3.0 }, | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "'newParticipantArrived'", | |
"id": 1020.0 | |
} | |
], | |
"id": 1019.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-string" } | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ":\n ", | |
"id": 1021.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "receiveVideo", | |
"id": 1023.0 | |
} | |
], | |
"id": 1022.0 | |
}, | |
{ "type": 3.0, "textContent": "(message.", "id": 1024.0 }, | |
{ | |
"childNodes": [ | |
{ "id": 1026.0, "type": 3.0, "textContent": "userid" } | |
], | |
"id": 1025.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-property" } | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ", message.", | |
"id": 1027.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-property" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "username", | |
"id": 1029.0 | |
} | |
], | |
"id": 1028.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ")\n ", | |
"id": 1030.0 | |
}, | |
{ | |
"id": 1031.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" }, | |
"childNodes": [ | |
{ "id": 1032.0, "type": 3.0, "textContent": "break" } | |
] | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1033.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "case", "id": 1035.0 } | |
], | |
"id": 1034.0 | |
}, | |
{ "type": 3.0, "textContent": " ", "id": 1036.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-string" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "'existingParticipants'", | |
"id": 1038.0 | |
} | |
], | |
"id": 1037.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ":\n ", | |
"id": 1039.0 | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "onExistingParticipants", | |
"id": 1041.0 | |
} | |
], | |
"id": 1040.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" } | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "(\n message.", | |
"id": 1042.0 | |
}, | |
{ | |
"tagName": "span", | |
"attributes": { "class": "hljs-property" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "userid", "id": 1044.0 } | |
], | |
"id": 1043.0, | |
"type": 2.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ",\n message.", | |
"id": 1045.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-property" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "existingUsers", | |
"id": 1047.0 | |
} | |
], | |
"id": 1046.0 | |
}, | |
{ | |
"textContent": "\n )\n ", | |
"id": 1048.0, | |
"type": 3.0 | |
}, | |
{ | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "break", "id": 1050.0 } | |
], | |
"id": 1049.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" } | |
}, | |
{ | |
"textContent": "\n ", | |
"id": 1051.0, | |
"type": 3.0 | |
}, | |
{ | |
"id": 1052.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "case", "id": 1053.0 } | |
] | |
}, | |
{ "id": 1054.0, "type": 3.0, "textContent": " " }, | |
{ | |
"attributes": { "class": "hljs-string" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "'receiveVideoAnswer'", | |
"id": 1056.0 | |
} | |
], | |
"id": 1055.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ":\n ", | |
"id": 1057.0 | |
}, | |
{ | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "onReceiveVideoAnswer", | |
"id": 1059.0 | |
} | |
], | |
"id": 1058.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ "type": 3.0, "textContent": "(message.", "id": 1060.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-property" }, | |
"childNodes": [ | |
{ | |
"textContent": "senderid", | |
"id": 1062.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1061.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ", message.", | |
"id": 1063.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-property" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "sdpAnswer", | |
"id": 1065.0 | |
} | |
], | |
"id": 1064.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ")\n ", | |
"id": 1066.0 | |
}, | |
{ | |
"attributes": { "class": "hljs-keyword" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "break", "id": 1068.0 } | |
], | |
"id": 1067.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ | |
"id": 1069.0, | |
"type": 3.0, | |
"textContent": "\n " | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" }, | |
"childNodes": [ | |
{ "textContent": "case", "id": 1071.0, "type": 3.0 } | |
], | |
"id": 1070.0 | |
}, | |
{ "type": 3.0, "textContent": " ", "id": 1072.0 }, | |
{ | |
"attributes": { "class": "hljs-string" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "'candidate'", | |
"id": 1074.0 | |
} | |
], | |
"id": 1073.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ":\n ", | |
"id": 1075.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"id": 1077.0, | |
"type": 3.0, | |
"textContent": "addIceCandidate" | |
} | |
], | |
"id": 1076.0 | |
}, | |
{ "type": 3.0, "textContent": "(message.", "id": 1078.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-property" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "userid", "id": 1080.0 } | |
], | |
"id": 1079.0 | |
}, | |
{ | |
"id": 1081.0, | |
"type": 3.0, | |
"textContent": ", message." | |
}, | |
{ | |
"tagName": "span", | |
"attributes": { "class": "hljs-property" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "candidate", | |
"id": 1083.0 | |
} | |
], | |
"id": 1082.0, | |
"type": 2.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ")\n ", | |
"id": 1084.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "break", "id": 1086.0 } | |
], | |
"id": 1085.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1087.0 | |
}, | |
{ | |
"attributes": { "class": "hljs-attr" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "default", | |
"id": 1089.0 | |
} | |
], | |
"id": 1088.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ":\n ", | |
"id": 1090.0 | |
}, | |
{ | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "break", "id": 1092.0 } | |
], | |
"id": 1091.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" } | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n }\n })\n ", | |
"id": 1093.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "return", "id": 1095.0 } | |
], | |
"id": 1094.0 | |
}, | |
{ "type": 3.0, "textContent": " ", "id": 1096.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-function" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "() =\u003e", | |
"id": 1098.0 | |
} | |
], | |
"id": 1097.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " {}\n }, [participants])\n\n ", | |
"id": 1099.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-comment" }, | |
"childNodes": [ | |
{ | |
"textContent": "// Socket Connetction handlers functions", | |
"id": 1101.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1100.0 | |
}, | |
{ "type": 3.0, "textContent": "\n\n ", "id": 1102.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "const", "id": 1104.0 } | |
], | |
"id": 1103.0 | |
}, | |
{ "type": 3.0, "textContent": " ", "id": 1105.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "onExistingParticipants", | |
"id": 1107.0 | |
} | |
], | |
"id": 1106.0 | |
}, | |
{ "type": 3.0, "textContent": " = (", "id": 1108.0 }, | |
{ | |
"id": 1109.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-params" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "userid, existingUsers", | |
"id": 1110.0 | |
} | |
] | |
}, | |
{ | |
"textContent": ") =\u003e {\n ", | |
"id": 1111.0, | |
"type": 3.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-variable language_" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "console", | |
"id": 1113.0 | |
} | |
], | |
"id": 1112.0 | |
}, | |
{ "type": 3.0, "textContent": ".", "id": 1114.0 }, | |
{ | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "log", "id": 1116.0 } | |
], | |
"id": 1115.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ "id": 1117.0, "type": 3.0, "textContent": "(" }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-string" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "'onExistingParticipants Called!!!!!'", | |
"id": 1119.0 | |
} | |
], | |
"id": 1118.0 | |
}, | |
{ | |
"textContent": ")\n\n ", | |
"id": 1120.0, | |
"type": 3.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-comment" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "//Add local User", | |
"id": 1122.0 | |
} | |
], | |
"id": 1121.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1123.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "const", "id": 1125.0 } | |
], | |
"id": 1124.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " user = {\n ", | |
"id": 1126.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-attr" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "id", "id": 1128.0 } | |
], | |
"id": 1127.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ": userid,\n ", | |
"id": 1129.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-attr" }, | |
"childNodes": [ | |
{ | |
"textContent": "username", | |
"id": 1131.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1130.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ": userName,\n ", | |
"id": 1132.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-attr" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "published", | |
"id": 1134.0 | |
} | |
], | |
"id": 1133.0 | |
}, | |
{ "textContent": ": ", "id": 1135.0, "type": 3.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-literal" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "true", "id": 1137.0 } | |
], | |
"id": 1136.0 | |
}, | |
{ | |
"id": 1138.0, | |
"type": 3.0, | |
"textContent": ",\n " | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "rtcPeer", | |
"id": 1140.0 | |
} | |
], | |
"id": 1139.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-attr" } | |
}, | |
{ "type": 3.0, "textContent": ": ", "id": 1141.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-literal" }, | |
"childNodes": [ | |
{ "id": 1143.0, "type": 3.0, "textContent": "null" } | |
], | |
"id": 1142.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n }\n\n ", | |
"id": 1144.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "setParticipants", | |
"id": 1146.0 | |
} | |
], | |
"id": 1145.0 | |
}, | |
{ "type": 3.0, "textContent": "(", "id": 1147.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-function" }, | |
"childNodes": [ | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-params" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "prevParticpants", | |
"id": 1150.0 | |
} | |
], | |
"id": 1149.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " =\u003e", | |
"id": 1151.0 | |
} | |
], | |
"id": 1148.0 | |
}, | |
{ | |
"id": 1152.0, | |
"type": 3.0, | |
"textContent": " ({\n ...prevParticpants,\n [user." | |
}, | |
{ | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "id", "id": 1154.0 } | |
], | |
"id": 1153.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-property" } | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "]: user\n }))\n\n existingUsers.", | |
"id": 1155.0 | |
}, | |
{ | |
"id": 1156.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "forEach", | |
"id": 1157.0 | |
} | |
] | |
}, | |
{ "textContent": "(", "id": 1158.0, "type": 3.0 }, | |
{ | |
"id": 1159.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "function", | |
"id": 1160.0 | |
} | |
] | |
}, | |
{ "type": 3.0, "textContent": "(", "id": 1161.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-params" }, | |
"childNodes": [ | |
{ | |
"textContent": "element", | |
"id": 1163.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1162.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ") {\n ", | |
"id": 1164.0 | |
}, | |
{ | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "receiveVideo", | |
"id": 1166.0 | |
} | |
], | |
"id": 1165.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ "type": 3.0, "textContent": "(element.", "id": 1167.0 }, | |
{ | |
"id": 1168.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-property" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "id", "id": 1169.0 } | |
] | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ", element.", | |
"id": 1170.0 | |
}, | |
{ | |
"tagName": "span", | |
"attributes": { "class": "hljs-property" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "name", "id": 1172.0 } | |
], | |
"id": 1171.0, | |
"type": 2.0 | |
}, | |
{ | |
"textContent": ")\n })\n }\n\n ", | |
"id": 1173.0, | |
"type": 3.0 | |
}, | |
{ | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "const", "id": 1175.0 } | |
], | |
"id": 1174.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" } | |
}, | |
{ "textContent": " ", "id": 1176.0, "type": 3.0 }, | |
{ | |
"id": 1177.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"id": 1178.0, | |
"type": 3.0, | |
"textContent": "onReceiveVideoAnswer" | |
} | |
] | |
}, | |
{ "type": 3.0, "textContent": " = (", "id": 1179.0 }, | |
{ | |
"childNodes": [ | |
{ | |
"id": 1181.0, | |
"type": 3.0, | |
"textContent": "senderid, sdpAnswer" | |
} | |
], | |
"id": 1180.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-params" } | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ") =\u003e {\n ", | |
"id": 1182.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-variable language_" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "console", | |
"id": 1184.0 | |
} | |
], | |
"id": 1183.0 | |
}, | |
{ "type": 3.0, "textContent": ".", "id": 1185.0 }, | |
{ | |
"id": 1186.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ "id": 1187.0, "type": 3.0, "textContent": "log" } | |
] | |
}, | |
{ "id": 1188.0, "type": 3.0, "textContent": "(" }, | |
{ | |
"attributes": { "class": "hljs-string" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "'participants in Receive answer -\u003e '", | |
"id": 1190.0 | |
} | |
], | |
"id": 1189.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ | |
"textContent": ", participants)\n ", | |
"id": 1191.0, | |
"type": 3.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-variable language_" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "console", | |
"id": 1193.0 | |
} | |
], | |
"id": 1192.0 | |
}, | |
{ "type": 3.0, "textContent": ".", "id": 1194.0 }, | |
{ | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "log", "id": 1196.0 } | |
], | |
"id": 1195.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": "(", "id": 1197.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-string" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "'***************'", | |
"id": 1199.0 | |
} | |
], | |
"id": 1198.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ")\n\n ", | |
"id": 1200.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-comment" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "// participants[senderid].rtcPeer.processAnswer(sdpAnswer)", | |
"id": 1202.0 | |
} | |
], | |
"id": 1201.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n }\n\n ", | |
"id": 1203.0 | |
}, | |
{ | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "const", "id": 1205.0 } | |
], | |
"id": 1204.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" } | |
}, | |
{ "type": 3.0, "textContent": " ", "id": 1206.0 }, | |
{ | |
"childNodes": [ | |
{ | |
"textContent": "addIceCandidate", | |
"id": 1208.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1207.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" } | |
}, | |
{ "type": 3.0, "textContent": " = (", "id": 1209.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-params" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "userid, candidate", | |
"id": 1211.0 | |
} | |
], | |
"id": 1210.0 | |
}, | |
{ | |
"textContent": ") =\u003e {\n ", | |
"id": 1212.0, | |
"type": 3.0 | |
}, | |
{ | |
"id": 1213.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-variable language_" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "console", | |
"id": 1214.0 | |
} | |
] | |
}, | |
{ "type": 3.0, "textContent": ".", "id": 1215.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "log", "id": 1217.0 } | |
], | |
"id": 1216.0 | |
}, | |
{ "type": 3.0, "textContent": "(", "id": 1218.0 }, | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "'participants in Receive canditate -\u003e '", | |
"id": 1220.0 | |
} | |
], | |
"id": 1219.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-string" } | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ", participants)\n ", | |
"id": 1221.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-variable language_" }, | |
"childNodes": [ | |
{ | |
"textContent": "console", | |
"id": 1223.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1222.0 | |
}, | |
{ "type": 3.0, "textContent": ".", "id": 1224.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "log", "id": 1226.0 } | |
], | |
"id": 1225.0 | |
}, | |
{ "type": 3.0, "textContent": "(", "id": 1227.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-string" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "'***************'", | |
"id": 1229.0 | |
} | |
], | |
"id": 1228.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ")\n ", | |
"id": 1230.0 | |
}, | |
{ | |
"id": 1231.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-comment" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "// participants[userid].rtcPeer.addIceCandidate(candidate)", | |
"id": 1232.0 | |
} | |
] | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n }\n\n ", | |
"id": 1233.0 | |
}, | |
{ | |
"attributes": { "class": "hljs-keyword" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "const", "id": 1235.0 } | |
], | |
"id": 1234.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ "textContent": " ", "id": 1236.0, "type": 3.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "receiveVideo", | |
"id": 1238.0 | |
} | |
], | |
"id": 1237.0 | |
}, | |
{ "type": 3.0, "textContent": " = (", "id": 1239.0 }, | |
{ | |
"tagName": "span", | |
"attributes": { "class": "hljs-params" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "userid, username", | |
"id": 1241.0 | |
} | |
], | |
"id": 1240.0, | |
"type": 2.0 | |
}, | |
{ | |
"id": 1242.0, | |
"type": 3.0, | |
"textContent": ") =\u003e {\n " | |
}, | |
{ | |
"tagName": "span", | |
"attributes": { "class": "hljs-variable language_" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "console", | |
"id": 1244.0 | |
} | |
], | |
"id": 1243.0, | |
"type": 2.0 | |
}, | |
{ "textContent": ".", "id": 1245.0, "type": 3.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "log", "id": 1247.0 } | |
], | |
"id": 1246.0 | |
}, | |
{ "textContent": "(", "id": 1248.0, "type": 3.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-string" }, | |
"childNodes": [ | |
{ | |
"id": 1250.0, | |
"type": 3.0, | |
"textContent": "'Received Video Called!!!!'" | |
} | |
], | |
"id": 1249.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ")\n ", | |
"id": 1251.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-comment" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "//Add remote User", | |
"id": 1253.0 | |
} | |
], | |
"id": 1252.0 | |
}, | |
{ | |
"id": 1254.0, | |
"type": 3.0, | |
"textContent": "\n " | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "const", "id": 1256.0 } | |
], | |
"id": 1255.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " user = {\n ", | |
"id": 1257.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-attr" }, | |
"childNodes": [ | |
{ "id": 1259.0, "type": 3.0, "textContent": "id" } | |
], | |
"id": 1258.0 | |
}, | |
{ | |
"textContent": ": userid,\n ", | |
"id": 1260.0, | |
"type": 3.0 | |
}, | |
{ | |
"attributes": { "class": "hljs-attr" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "username", | |
"id": 1262.0 | |
} | |
], | |
"id": 1261.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ": username,\n ", | |
"id": 1263.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-attr" }, | |
"childNodes": [ | |
{ | |
"textContent": "published", | |
"id": 1265.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1264.0 | |
}, | |
{ "type": 3.0, "textContent": ": ", "id": 1266.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-literal" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "false", "id": 1268.0 } | |
], | |
"id": 1267.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ",\n ", | |
"id": 1269.0 | |
}, | |
{ | |
"attributes": { "class": "hljs-attr" }, | |
"childNodes": [ | |
{ | |
"id": 1271.0, | |
"type": 3.0, | |
"textContent": "rtcPeer" | |
} | |
], | |
"id": 1270.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ "type": 3.0, "textContent": ": ", "id": 1272.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-literal" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "null", "id": 1274.0 } | |
], | |
"id": 1273.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n }\n\n ", | |
"id": 1275.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "setParticipants", | |
"id": 1277.0 | |
} | |
], | |
"id": 1276.0 | |
}, | |
{ "type": 3.0, "textContent": "(", "id": 1278.0 }, | |
{ | |
"tagName": "span", | |
"attributes": { "class": "hljs-function" }, | |
"childNodes": [ | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-params" }, | |
"childNodes": [ | |
{ | |
"id": 1281.0, | |
"type": 3.0, | |
"textContent": "prevParticpants" | |
} | |
], | |
"id": 1280.0 | |
}, | |
{ | |
"id": 1282.0, | |
"type": 3.0, | |
"textContent": " =\u003e" | |
} | |
], | |
"id": 1279.0, | |
"type": 2.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " ({\n ...prevParticpants,\n [user.", | |
"id": 1283.0 | |
}, | |
{ | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "id", "id": 1285.0 } | |
], | |
"id": 1284.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-property" } | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "]: user\n }))\n }\n\n ", | |
"id": 1286.0 | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "//Callback for setting rtcPeer after creating it in child component", | |
"id": 1288.0 | |
} | |
], | |
"id": 1287.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-comment" } | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 1289.0 }, | |
{ | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "const", "id": 1291.0 } | |
], | |
"id": 1290.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" } | |
}, | |
{ "id": 1292.0, "type": 3.0, "textContent": " " }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"id": 1294.0, | |
"type": 3.0, | |
"textContent": "setRtcPeerForUser" | |
} | |
], | |
"id": 1293.0 | |
}, | |
{ "type": 3.0, "textContent": " = (", "id": 1295.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-params" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "userid, rtcPeer", | |
"id": 1297.0 | |
} | |
], | |
"id": 1296.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ") =\u003e {\n ", | |
"id": 1298.0 | |
}, | |
{ | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "setParticipants", | |
"id": 1300.0 | |
} | |
], | |
"id": 1299.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": "(", "id": 1301.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-function" }, | |
"childNodes": [ | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "prevParticpants", | |
"id": 1304.0 | |
} | |
], | |
"id": 1303.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-params" } | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " =\u003e", | |
"id": 1305.0 | |
} | |
], | |
"id": 1302.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " ({\n ...prevParticpants,\n [userid]: { ...prevParticpants[userid], ", | |
"id": 1306.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-attr" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "rtcPeer", | |
"id": 1308.0 | |
} | |
], | |
"id": 1307.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ": rtcPeer }\n }))\n }\n\n ", | |
"id": 1309.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "return", "id": 1311.0 } | |
], | |
"id": 1310.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " (\n ", | |
"id": 1312.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "language-xml" }, | |
"childNodes": [ | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\u003c", | |
"id": 1315.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-name" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "div", | |
"id": 1317.0 | |
} | |
], | |
"id": 1316.0 | |
}, | |
{ "type": 3.0, "textContent": " ", "id": 1318.0 }, | |
{ | |
"childNodes": [ | |
{ | |
"id": 1320.0, | |
"type": 3.0, | |
"textContent": "id" | |
} | |
], | |
"id": 1319.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-attr" } | |
}, | |
{ "type": 3.0, "textContent": "=", "id": 1321.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-string" }, | |
"childNodes": [ | |
{ | |
"id": 1323.0, | |
"type": 3.0, | |
"textContent": "\"meetingRoom\"" | |
} | |
], | |
"id": 1322.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\u003e", | |
"id": 1324.0 | |
} | |
], | |
"id": 1314.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-tag" } | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n {Object.values(participants).map(participant =\u003e (\n ", | |
"id": 1325.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-tag" }, | |
"childNodes": [ | |
{ | |
"id": 1327.0, | |
"type": 3.0, | |
"textContent": "\u003c" | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-name" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Participant", | |
"id": 1329.0 | |
} | |
], | |
"id": 1328.0 | |
}, | |
{ | |
"id": 1330.0, | |
"type": 3.0, | |
"textContent": "\n " | |
}, | |
{ | |
"id": 1331.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-attr" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "key", | |
"id": 1332.0 | |
} | |
] | |
}, | |
{ "id": 1333.0, "type": 3.0, "textContent": "=" }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-string" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "{participant.id}", | |
"id": 1335.0 | |
} | |
], | |
"id": 1334.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1336.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-attr" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "participant", | |
"id": 1338.0 | |
} | |
], | |
"id": 1337.0 | |
}, | |
{ "type": 3.0, "textContent": "=", "id": 1339.0 }, | |
{ | |
"id": 1340.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-string" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "{participant}", | |
"id": 1341.0 | |
} | |
] | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1342.0 | |
}, | |
{ | |
"id": 1343.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-attr" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "roomName", | |
"id": 1344.0 | |
} | |
] | |
}, | |
{ "type": 3.0, "textContent": "=", "id": 1345.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-string" }, | |
"childNodes": [ | |
{ | |
"id": 1347.0, | |
"type": 3.0, | |
"textContent": "{roomName}" | |
} | |
], | |
"id": 1346.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1348.0 | |
}, | |
{ | |
"tagName": "span", | |
"attributes": { "class": "hljs-attr" }, | |
"childNodes": [ | |
{ | |
"textContent": "setRtcPeerForUser", | |
"id": 1350.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1349.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": "=", "id": 1351.0 }, | |
{ | |
"attributes": { "class": "hljs-string" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "{setRtcPeerForUser}", | |
"id": 1353.0 | |
} | |
], | |
"id": 1352.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1354.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-attr" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "sendMessage", | |
"id": 1356.0 | |
} | |
], | |
"id": 1355.0 | |
}, | |
{ "type": 3.0, "textContent": "=", "id": 1357.0 }, | |
{ | |
"attributes": { "class": "hljs-string" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "{sendMessage}", | |
"id": 1359.0 | |
} | |
], | |
"id": 1358.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n /\u003e", | |
"id": 1360.0 | |
} | |
], | |
"id": 1326.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ))}\n ", | |
"id": 1361.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-tag" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\u003c/", | |
"id": 1363.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-name" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "div", | |
"id": 1365.0 | |
} | |
], | |
"id": 1364.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\u003e", | |
"id": 1366.0 | |
} | |
], | |
"id": 1362.0 | |
} | |
], | |
"id": 1313.0 | |
}, | |
{ | |
"id": 1367.0, | |
"type": 3.0, | |
"textContent": "\n )\n}\n" | |
} | |
] | |
} | |
], | |
"id": 953.0 | |
}, | |
{ "type": 3.0, "textContent": "\n\n", "id": 1368.0 }, | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "the only state it has is a hashTable of ", | |
"id": 1370.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "strong", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "participants", | |
"id": 1372.0 | |
} | |
], | |
"id": 1371.0 | |
}, | |
{ | |
"id": 1373.0, | |
"type": 3.0, | |
"textContent": " inside the call using useState hook to define it." | |
} | |
], | |
"id": 1369.0, | |
"type": 2.0, | |
"tagName": "p", | |
"attributes": {} | |
}, | |
{ "type": 3.0, "textContent": "\n\n", "id": 1374.0 }, | |
{ | |
"id": 1375.0, | |
"type": 2.0, | |
"tagName": "p", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "then I'm using useEffect to listen on the socket events for the chat room just 4 events ", | |
"id": 1376.0 | |
} | |
] | |
}, | |
{ "type": 3.0, "textContent": "\n\n", "id": 1377.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "p", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "then After that, I'm defining the 4 callback handlers for those events with respect to there order of execution on the server", | |
"id": 1379.0 | |
} | |
], | |
"id": 1378.0 | |
}, | |
{ "textContent": "\n\n", "id": 1380.0, "type": 3.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "p", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "and last I have another callback function that gets passed to every child participant in the list so that after the child component creates its rtcPeer object it send it to the parent to set it on the participant object in the participant's hashTable", | |
"id": 1382.0 | |
} | |
], | |
"id": 1381.0 | |
}, | |
{ "type": 3.0, "textContent": "\n\n", "id": 1383.0 }, | |
{ | |
"tagName": "p", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "The flow goes like this participants join the room -\u003e ", | |
"id": 1385.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "strong", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"textContent": "existingParticipants", | |
"id": 1387.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1386.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " event gets called -\u003e local participant gets created and added to the participants hashTable then -\u003e ", | |
"id": 1388.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "strong", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "recieveVideoAnswer", | |
"id": 1390.0 | |
} | |
], | |
"id": 1389.0 | |
}, | |
{ "type": 3.0, "textContent": " and ", "id": 1391.0 }, | |
{ | |
"tagName": "strong", | |
"attributes": {}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "candidate", "id": 1393.0 } | |
], | |
"id": 1392.0, | |
"type": 2.0 | |
}, | |
{ | |
"textContent": " gets emitted by the server multiple time as you can see in the screenshot", | |
"id": 1394.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1384.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": "\n\n", "id": 1395.0 }, | |
{ | |
"tagName": "p", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "the first event the state is empty the subsequent two events its there then it's empty again and this pattern keeps repeating one empty state then the following two is correct and I have no idea what's going on with the state", | |
"id": 1397.0 | |
} | |
], | |
"id": 1396.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": "\n\n", "id": 1398.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "p", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"id": 1400.0, | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://i.stack.imgur.com/ViI5Q.png", | |
"rel": "noreferrer" | |
}, | |
"childNodes": [ | |
{ | |
"tagName": "img", | |
"attributes": { | |
"src": "https://i.stack.imgur.com/ViI5Q.png", | |
"alt": "enter image description here" | |
}, | |
"childNodes": [], | |
"id": 1401.0, | |
"type": 2.0 | |
} | |
] | |
} | |
], | |
"id": 1399.0 | |
}, | |
{ "id": 1402.0, "type": 3.0, "textContent": "\n " } | |
], | |
"id": 948.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "s-prose js-post-body", | |
"itemprop": "text" | |
} | |
}, | |
{ "type": 3.0, "textContent": "\n\n ", "id": 1403.0 }, | |
{ | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 1405.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "post-taglist d-flex gs4 gsy fd-column" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1407.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "d-flex ps-relative" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1409.0 | |
}, | |
{ | |
"tagName": "a", | |
"attributes": { | |
"rel": "tag", | |
"href": "https://stackoverflow.com/questions/tagged/reactjs", | |
"class": "post-tag js-gps-track", | |
"title": "show questions tagged 'reactjs'" | |
}, | |
"childNodes": [ | |
{ | |
"textContent": "reactjs", | |
"id": 1411.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1410.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": " ", "id": 1412.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"class": "post-tag js-gps-track", | |
"title": "show questions tagged 'socket.io'", | |
"rel": "tag", | |
"href": "https://stackoverflow.com/questions/tagged/socket.io" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "socket.io", | |
"id": 1414.0 | |
} | |
], | |
"id": 1413.0 | |
}, | |
{ "id": 1415.0, "type": 3.0, "textContent": " " }, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"rel": "tag", | |
"href": "https://stackoverflow.com/questions/tagged/webrtc", | |
"class": "post-tag js-gps-track", | |
"title": "show questions tagged 'webrtc'" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "webrtc", "id": 1417.0 } | |
], | |
"id": 1416.0 | |
}, | |
{ "type": 3.0, "textContent": " ", "id": 1418.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackoverflow.com/questions/tagged/react-hooks", | |
"class": "post-tag js-gps-track", | |
"title": "show questions tagged 'react-hooks'", | |
"rel": "tag" | |
}, | |
"childNodes": [ | |
{ | |
"id": 1420.0, | |
"type": 3.0, | |
"textContent": "react-hooks" | |
} | |
], | |
"id": 1419.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " \n ", | |
"id": 1421.0 | |
} | |
], | |
"id": 1408.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 1422.0 } | |
], | |
"id": 1406.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 1423.0 } | |
], | |
"id": 1404.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "mt24 mb12" } | |
}, | |
{ "type": 3.0, "textContent": "\n\n ", "id": 1424.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "mb0 " }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 1426.0 }, | |
{ | |
"attributes": { | |
"class": "mt16 d-flex gs8 gsy fw-wrap jc-end ai-start pt4 mb16" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1428.0 | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n \n\n\n", | |
"id": 1430.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "js-post-menu pt2", | |
"data-post-id": "54824036" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1432.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "d-flex gs8 s-anchors s-anchors__muted fw-wrap" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n\n ", | |
"id": 1434.0 | |
}, | |
{ | |
"attributes": { "class": "flex--item" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1436.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"data-action": " s-popover#toggle se-share-sheet#preventNavigation s-popover:show-\u003ese-share-sheet#willShow s-popover:shown-\u003ese-share-sheet#didShow", | |
"data-gps-track": "post.click({ item: 2, priv: -1, post_type: 1 })", | |
"data-se-share-sheet-location": "1", | |
"aria-controls": "se-share-sheet-0", | |
"data-se-share-sheet-post-type": "question", | |
"data-se-share-sheet-license-name": "CC BY-SA 4.0", | |
"data-s-popover-placement": "bottom-start", | |
"rel": "nofollow", | |
"itemprop": "url", | |
"data-controller": "se-share-sheet s-popover", | |
"data-se-share-sheet-title": "Share a link to this question", | |
"data-se-share-sheet-social": "facebook twitter devto", | |
"data-se-share-sheet-license-url": "https%3a%2f%2fcreativecommons.org%2flicenses%2fby-sa%2f4.0%2f", | |
"href": "https://stackoverflow.com/q/54824036/11971167", | |
"class": "js-share-link js-gps-track", | |
"title": "Short permalink to this question", | |
"data-se-share-sheet-subtitle": "(Includes your user id)" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Share", | |
"id": 1438.0 | |
} | |
], | |
"id": 1437.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "s-popover z-dropdown s-anchors s-anchors__default", | |
"style": "width: unset; max-width: 28em;", | |
"id": "se-share-sheet-0" | |
}, | |
"childNodes": [ | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "s-popover--arrow" | |
}, | |
"childNodes": [], | |
"id": 1440.0 | |
}, | |
{ | |
"id": 1441.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { | |
"class": "js-title fw-bold" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Share a link to this question", | |
"id": 1443.0 | |
} | |
], | |
"id": 1442.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " ", | |
"id": 1444.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { | |
"class": "js-subtitle" | |
}, | |
"childNodes": [ | |
{ | |
"textContent": "(Includes your user id)", | |
"id": 1446.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1445.0 | |
} | |
] | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "my8" }, | |
"childNodes": [ | |
{ | |
"type": 2.0, | |
"tagName": "input", | |
"attributes": { | |
"type": "text", | |
"class": "js-input s-input wmn3 sm:wmn-initial", | |
"readonly": "", | |
"value": "https://stackoverflow.com/q/54824036/11971167" | |
}, | |
"childNodes": [], | |
"id": 1448.0 | |
} | |
], | |
"id": 1447.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "d-flex jc-space-between ai-center mbn4" | |
}, | |
"childNodes": [ | |
{ | |
"type": 2.0, | |
"tagName": "button", | |
"attributes": { | |
"class": "js-copy-link-btn s-btn s-btn__link" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Copy link", | |
"id": 1451.0 | |
} | |
], | |
"id": 1450.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://creativecommons.org/licenses/by-sa/4.0/", | |
"rel": "license", | |
"class": "js-license s-block-link w-auto", | |
"target": "_blank", | |
"title": "The current license for this post: CC BY-SA 4.0" | |
}, | |
"childNodes": [ | |
{ | |
"textContent": "CC BY-SA 4.0", | |
"id": 1453.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1452.0 | |
}, | |
{ | |
"id": 1454.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "js-social-container d-none" | |
}, | |
"childNodes": [] | |
} | |
], | |
"id": 1449.0 | |
} | |
], | |
"id": 1439.0 | |
}, | |
{ | |
"textContent": "\n ", | |
"id": 1455.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1435.0, | |
"type": 2.0, | |
"tagName": "div" | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n\n\n ", | |
"id": 1456.0 | |
}, | |
{ | |
"attributes": { "class": "flex--item" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1458.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "button", | |
"attributes": { | |
"class": "s-btn s-btn__link js-error-click js-gps-track", | |
"data-gps-track": "post.click({ item: 6, priv: -1, post_type: 1 }); suggestededit.queue_full", | |
"title": "Revise and improve this post", | |
"data-error-message": "Suggested edit queue is full", | |
"type": "button" | |
}, | |
"childNodes": [ | |
{ | |
"id": 1460.0, | |
"type": 3.0, | |
"textContent": "Edit" | |
} | |
], | |
"id": 1459.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1461.0 | |
} | |
], | |
"id": 1457.0, | |
"type": 2.0, | |
"tagName": "div" | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n\n ", | |
"id": 1462.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "flex--item" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1464.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "button", | |
"attributes": { | |
"data-controller": "s-tooltip ", | |
"aria-controls": "", | |
"aria-describedby": "--stacks-s-tooltip-f7036x85", | |
"type": "button", | |
"class": "s-btn s-btn__link js-follow-post js-follow-question js-gps-track", | |
"data-s-tooltip-placement": "bottom", | |
"data-s-popover-placement": "bottom", | |
"id": "btnFollowPost-54824036", | |
"data-gps-track": "post.click({ item: 14, priv: -1, post_type: 1 })" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n Follow\n ", | |
"id": 1466.0 | |
} | |
], | |
"id": 1465.0 | |
}, | |
{ | |
"tagName": "div", | |
"attributes": { | |
"id": "--stacks-s-tooltip-f7036x85", | |
"class": "s-popover s-popover__tooltip pe-none", | |
"aria-hidden": "true", | |
"role": "tooltip" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Follow this question to receive notifications", | |
"id": 1468.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "s-popover--arrow" | |
}, | |
"childNodes": [], | |
"id": 1469.0 | |
} | |
], | |
"id": 1467.0, | |
"type": 2.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1470.0 | |
} | |
], | |
"id": 1463.0 | |
}, | |
{ | |
"id": 1471.0, | |
"type": 3.0, | |
"textContent": "\n\n\n\n\n\n \n " | |
} | |
], | |
"id": 1433.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1472.0 | |
}, | |
{ | |
"childNodes": [], | |
"id": 1473.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "js-menu-popup-container" } | |
}, | |
{ "id": 1474.0, "type": 3.0, "textContent": "\n" } | |
], | |
"id": 1431.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1475.0 | |
} | |
], | |
"id": 1429.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "flex--item mr16 fl1 w96" } | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n\n ", | |
"id": 1476.0 | |
}, | |
{ | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n", "id": 1478.0 }, | |
{ | |
"tagName": "div", | |
"attributes": { "class": "user-info " }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1480.0 | |
}, | |
{ | |
"tagName": "div", | |
"attributes": { "class": "user-action-time" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1482.0 | |
}, | |
{ | |
"attributes": { | |
"data-gps-track": "post.click({ item: 4, priv: -1, post_type: 1 })", | |
"href": "https://stackoverflow.com/posts/54824036/revisions", | |
"title": "show all edits to this post", | |
"class": "js-gps-track" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "edited ", | |
"id": 1484.0 | |
}, | |
{ | |
"attributes": { | |
"class": "relativetime", | |
"title": "2019-03-10 07:55:59Z" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Mar 10 '19 at 7:55", | |
"id": 1486.0 | |
} | |
], | |
"id": 1485.0, | |
"type": 2.0, | |
"tagName": "span" | |
} | |
], | |
"id": 1483.0, | |
"type": 2.0, | |
"tagName": "a" | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1487.0 | |
} | |
], | |
"id": 1481.0, | |
"type": 2.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1488.0 | |
}, | |
{ | |
"id": 1489.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "user-gravatar32" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n \n ", | |
"id": 1490.0 | |
} | |
] | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1491.0 | |
}, | |
{ | |
"attributes": { | |
"itemprop": "author", | |
"itemscope": "", | |
"itemtype": "http://schema.org/Person", | |
"class": "user-details" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1493.0 | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Mo Hajr", | |
"id": 1495.0 | |
} | |
], | |
"id": 1494.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { | |
"class": "d-none", | |
"itemprop": "name" | |
} | |
}, | |
{ | |
"id": 1496.0, | |
"type": 3.0, | |
"textContent": "\n " | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "-flair" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n \n ", | |
"id": 1498.0 | |
} | |
], | |
"id": 1497.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1499.0 | |
} | |
], | |
"id": 1492.0, | |
"type": 2.0, | |
"tagName": "div" | |
}, | |
{ "type": 3.0, "textContent": "\n", "id": 1500.0 } | |
], | |
"id": 1479.0, | |
"type": 2.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1501.0 | |
} | |
], | |
"id": 1477.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "post-signature flex--item" } | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1502.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "post-signature owner flex--item" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1504.0 | |
}, | |
{ | |
"attributes": { "class": "user-info user-hover" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1506.0 | |
}, | |
{ | |
"attributes": { "class": "user-action-time" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n asked ", | |
"id": 1508.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { | |
"title": "2019-02-22 09:34:48Z", | |
"class": "relativetime" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Feb 22 '19 at 9:34", | |
"id": 1510.0 | |
} | |
], | |
"id": 1509.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1511.0 | |
} | |
], | |
"id": 1507.0, | |
"type": 2.0, | |
"tagName": "div" | |
}, | |
{ | |
"id": 1512.0, | |
"type": 3.0, | |
"textContent": "\n " | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "user-gravatar32" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1514.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackoverflow.com/users/6531461/mo-hajr" | |
}, | |
"childNodes": [ | |
{ | |
"attributes": { | |
"class": "gravatar-wrapper-32" | |
}, | |
"childNodes": [ | |
{ | |
"type": 2.0, | |
"tagName": "img", | |
"attributes": { | |
"height": "32", | |
"class": "bar-sm", | |
"src": "https://i.stack.imgur.com/LqPwA.jpg?s=64\u0026g=1", | |
"alt": "", | |
"width": "32" | |
}, | |
"childNodes": [], | |
"id": 1517.0 | |
} | |
], | |
"id": 1516.0, | |
"type": 2.0, | |
"tagName": "div" | |
} | |
], | |
"id": 1515.0 | |
}, | |
{ | |
"textContent": "\n ", | |
"id": 1518.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1513.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1519.0 | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1521.0 | |
}, | |
{ | |
"id": 1522.0, | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackoverflow.com/users/6531461/mo-hajr" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Mo Hajr", | |
"id": 1523.0 | |
} | |
] | |
}, | |
{ | |
"tagName": "span", | |
"attributes": { | |
"class": "d-none", | |
"itemprop": "name" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Mo Hajr", | |
"id": 1525.0 | |
} | |
], | |
"id": 1524.0, | |
"type": 2.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1526.0 | |
}, | |
{ | |
"attributes": { "class": "-flair" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1528.0 | |
}, | |
{ | |
"attributes": { | |
"class": "reputation-score", | |
"title": "reputation score ", | |
"dir": "ltr" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "1,024", | |
"id": 1530.0 | |
} | |
], | |
"id": 1529.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"tagName": "span", | |
"attributes": { "class": "badge1" }, | |
"childNodes": [], | |
"id": 1532.0, | |
"type": 2.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "badgecount" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "1", | |
"id": 1534.0 | |
} | |
], | |
"id": 1533.0 | |
} | |
], | |
"id": 1531.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { | |
"title": "1 gold badge", | |
"aria-hidden": "true" | |
} | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "v-visible-sr" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "1 gold badge", | |
"id": 1536.0 | |
} | |
], | |
"id": 1535.0 | |
}, | |
{ | |
"tagName": "span", | |
"attributes": { | |
"title": "13 silver badges", | |
"aria-hidden": "true" | |
}, | |
"childNodes": [ | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "badge2" }, | |
"childNodes": [], | |
"id": 1538.0 | |
}, | |
{ | |
"id": 1539.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "badgecount" }, | |
"childNodes": [ | |
{ | |
"textContent": "13", | |
"id": 1540.0, | |
"type": 3.0 | |
} | |
] | |
} | |
], | |
"id": 1537.0, | |
"type": 2.0 | |
}, | |
{ | |
"id": 1541.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "v-visible-sr" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "13 silver badges", | |
"id": 1542.0 | |
} | |
] | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"tagName": "span", | |
"attributes": { "class": "badge3" }, | |
"childNodes": [], | |
"id": 1544.0, | |
"type": 2.0 | |
}, | |
{ | |
"tagName": "span", | |
"attributes": { "class": "badgecount" }, | |
"childNodes": [ | |
{ | |
"textContent": "28", | |
"id": 1546.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1545.0, | |
"type": 2.0 | |
} | |
], | |
"id": 1543.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { | |
"title": "28 bronze badges", | |
"aria-hidden": "true" | |
} | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "v-visible-sr" }, | |
"childNodes": [ | |
{ | |
"id": 1548.0, | |
"type": 3.0, | |
"textContent": "28 bronze badges" | |
} | |
], | |
"id": 1547.0 | |
}, | |
{ | |
"id": 1549.0, | |
"type": 3.0, | |
"textContent": "\n " | |
} | |
], | |
"id": 1527.0, | |
"type": 2.0, | |
"tagName": "div" | |
}, | |
{ | |
"textContent": "\n ", | |
"id": 1550.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1520.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "user-details", | |
"itemprop": "author", | |
"itemscope": "", | |
"itemtype": "http://schema.org/Person" | |
} | |
}, | |
{ "type": 3.0, "textContent": "\n", "id": 1551.0 } | |
], | |
"id": 1505.0, | |
"type": 2.0, | |
"tagName": "div" | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n\n\n ", | |
"id": 1552.0 | |
} | |
], | |
"id": 1503.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 1553.0 } | |
], | |
"id": 1427.0, | |
"type": 2.0, | |
"tagName": "div" | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 1554.0 } | |
], | |
"id": 1425.0 | |
}, | |
{ "type": 3.0, "textContent": "\n \n", "id": 1555.0 } | |
], | |
"id": 946.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "postcell post-layout--right" } | |
}, | |
{ "type": 3.0, "textContent": "\n\n\n\n\n ", "id": 1556.0 }, | |
{ | |
"attributes": { "class": "d-none", "itemprop": "commentCount" }, | |
"childNodes": [{ "type": 3.0, "textContent": "11", "id": 1558.0 }], | |
"id": 1557.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ "type": 3.0, "textContent": " \n ", "id": 1559.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "post-layout--right js-post-comments-component" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 1561.0 }, | |
{ | |
"id": 1562.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"data-post-id": "54824036", | |
"data-min-length": "15", | |
"id": "comments-54824036", | |
"class": "comments js-comments-container bt bc-black-075 mt12 " | |
}, | |
"childNodes": [ | |
{ "textContent": "\n ", "id": 1563.0, "type": 3.0 }, | |
{ | |
"tagName": "ul", | |
"attributes": { | |
"class": "comments-list js-comments-list", | |
"data-remaining-comments-count": "6", | |
"data-canpost": "false", | |
"data-cansee": "true", | |
"data-comments-unavailable": "false", | |
"data-addlink-disabled": "true" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n\n ", | |
"id": 1565.0 | |
}, | |
{ | |
"tagName": "li", | |
"attributes": { | |
"data-comment-score": "0", | |
"id": "comment-96422846", | |
"class": "comment js-comment ", | |
"data-comment-id": "96422846", | |
"data-comment-owner-id": "3617886" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1567.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "js-comment-actions comment-actions" | |
}, | |
"childNodes": [ | |
{ | |
"id": 1569.0, | |
"type": 3.0, | |
"textContent": "\n " | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "comment-score js-comment-edit-hide" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1571.0 | |
} | |
], | |
"id": 1570.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1572.0 | |
} | |
], | |
"id": 1568.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1573.0 | |
}, | |
{ | |
"id": 1574.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "comment-text js-comment-text-and-form" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1575.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "comment-body js-comment-edit-hide" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n \n ", | |
"id": 1577.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "comment-copy" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "You are not giving an empty array as second argument to ", | |
"id": 1579.0 | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"textContent": "useEffect", | |
"id": 1581.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1580.0, | |
"type": 2.0, | |
"tagName": "code", | |
"attributes": {} | |
}, | |
{ | |
"id": 1582.0, | |
"type": 3.0, | |
"textContent": ", so you will create a new listener for every render. Is that really what you want? It's also a good idea to return a cleanup function from the function given to " | |
}, | |
{ | |
"id": 1583.0, | |
"type": 2.0, | |
"tagName": "code", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "useEffect", | |
"id": 1584.0 | |
} | |
] | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " so that the listener will be removed when the ", | |
"id": 1585.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "code", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"textContent": "ConferencingRoom", | |
"id": 1587.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1586.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " component is unmounted.", | |
"id": 1588.0 | |
} | |
], | |
"id": 1578.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n \n ", | |
"id": 1589.0 | |
}, | |
{ | |
"id": 1590.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "d-inline-flex ai-center" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n– ", | |
"id": 1591.0 | |
}, | |
{ | |
"attributes": { | |
"href": "https://stackoverflow.com/users/3617886/tholle", | |
"title": "88,712 reputation", | |
"class": "comment-user" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Tholle", | |
"id": 1593.0 | |
} | |
], | |
"id": 1592.0, | |
"type": 2.0, | |
"tagName": "a" | |
}, | |
{ | |
"id": 1594.0, | |
"type": 3.0, | |
"textContent": "\n " | |
} | |
] | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1595.0 | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"class": "comment-link", | |
"href": "https://stackoverflow.com/questions/54824036/useeffect-hook-with-socket-io-state-is-not-persistent-in-socket-handlers#comment96422846_54824036" | |
}, | |
"childNodes": [ | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { | |
"title": "2019-02-22 09:37:15Z, License: CC BY-SA 4.0", | |
"class": "relativetime-clean" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Feb 22 '19 at 9:37", | |
"id": 1599.0 | |
} | |
], | |
"id": 1598.0 | |
} | |
], | |
"id": 1597.0 | |
} | |
], | |
"id": 1596.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { | |
"class": "comment-date", | |
"dir": "ltr" | |
} | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1600.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { | |
"title": "this comment was edited 1 time" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1602.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "svg", | |
"attributes": { | |
"class": "va-text-bottom o50 svg-icon iconPencilSm", | |
"width": "14", | |
"height": "14", | |
"viewBox": "0 0 14 14", | |
"aria-hidden": "true" | |
}, | |
"childNodes": [ | |
{ | |
"childNodes": [], | |
"id": 1604.0, | |
"type": 2.0, | |
"tagName": "path", | |
"attributes": { | |
"d": "m11.1 1.71 1.13 1.12c.2.2.2.51 0 .71L11.1 4.7 9.21 2.86l1.17-1.15c.2-.2.51-.2.71 0ZM2 10.12l6.37-6.43 1.88 1.88L3.88 12H2v-1.88Z" | |
} | |
} | |
], | |
"isSVG": true, | |
"id": 1603.0 | |
}, | |
{ | |
"textContent": "\n ", | |
"id": 1605.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1601.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1606.0 | |
} | |
], | |
"id": 1576.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1607.0 | |
} | |
] | |
}, | |
{ "id": 1608.0, "type": 3.0, "textContent": "\n " } | |
], | |
"id": 1566.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 1609.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": { | |
"data-comment-owner-id": "6531461", | |
"data-comment-score": "1", | |
"id": "comment-96422894", | |
"class": "comment js-comment ", | |
"data-comment-id": "96422894" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1611.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "js-comment-actions comment-actions" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1613.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "comment-score js-comment-edit-hide" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1615.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { | |
"title": "number of 'useful comment' votes received", | |
"class": "cool" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "1", | |
"id": 1617.0 | |
} | |
], | |
"id": 1616.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1618.0 | |
} | |
], | |
"id": 1614.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1619.0 | |
} | |
], | |
"id": 1612.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1620.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "comment-text js-comment-text-and-form" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1622.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "comment-body js-comment-edit-hide" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n \n ", | |
"id": 1624.0 | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"textContent": "@Tholle if I gave an empty array the state becomes empty all the time and no that's not what I want", | |
"id": 1626.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1625.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "comment-copy" } | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n \n ", | |
"id": 1627.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "d-inline-flex ai-center" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n– ", | |
"id": 1629.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"class": "comment-user owner", | |
"href": "https://stackoverflow.com/users/6531461/mo-hajr", | |
"title": "1,024 reputation" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Mo Hajr", | |
"id": 1631.0 | |
} | |
], | |
"id": 1630.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1632.0 | |
} | |
], | |
"id": 1628.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1633.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { | |
"class": "comment-date", | |
"dir": "ltr" | |
}, | |
"childNodes": [ | |
{ | |
"attributes": { | |
"class": "comment-link", | |
"href": "https://stackoverflow.com/questions/54824036/useeffect-hook-with-socket-io-state-is-not-persistent-in-socket-handlers#comment96422894_54824036" | |
}, | |
"childNodes": [ | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { | |
"class": "relativetime-clean", | |
"title": "2019-02-22 09:38:43Z, License: CC BY-SA 4.0" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Feb 22 '19 at 9:38", | |
"id": 1637.0 | |
} | |
], | |
"id": 1636.0 | |
} | |
], | |
"id": 1635.0, | |
"type": 2.0, | |
"tagName": "a" | |
} | |
], | |
"id": 1634.0 | |
}, | |
{ | |
"id": 1638.0, | |
"type": 3.0, | |
"textContent": "\n " | |
}, | |
{ | |
"attributes": { | |
"title": "this comment was edited 2 times" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1640.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "svg", | |
"attributes": { | |
"viewBox": "0 0 14 14", | |
"aria-hidden": "true", | |
"class": "va-text-bottom o50 svg-icon iconPencilSm", | |
"width": "14", | |
"height": "14" | |
}, | |
"childNodes": [ | |
{ | |
"type": 2.0, | |
"tagName": "path", | |
"attributes": { | |
"d": "m11.1 1.71 1.13 1.12c.2.2.2.51 0 .71L11.1 4.7 9.21 2.86l1.17-1.15c.2-.2.51-.2.71 0ZM2 10.12l6.37-6.43 1.88 1.88L3.88 12H2v-1.88Z" | |
}, | |
"childNodes": [], | |
"id": 1642.0 | |
} | |
], | |
"isSVG": true, | |
"id": 1641.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1643.0 | |
} | |
], | |
"id": 1639.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1644.0 | |
} | |
], | |
"id": 1623.0 | |
}, | |
{ | |
"textContent": "\n ", | |
"id": 1645.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1621.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 1646.0 } | |
], | |
"id": 1610.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 1647.0 }, | |
{ | |
"id": 1648.0, | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": { | |
"id": "comment-96428843", | |
"class": "comment js-comment ", | |
"data-comment-id": "96428843", | |
"data-comment-owner-id": "7495930", | |
"data-comment-score": "0" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1649.0 | |
}, | |
{ | |
"id": 1650.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "js-comment-actions comment-actions" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1651.0 | |
}, | |
{ | |
"tagName": "div", | |
"attributes": { | |
"class": "comment-score js-comment-edit-hide" | |
}, | |
"childNodes": [ | |
{ | |
"textContent": "\n ", | |
"id": 1653.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1652.0, | |
"type": 2.0 | |
}, | |
{ | |
"id": 1654.0, | |
"type": 3.0, | |
"textContent": "\n " | |
} | |
] | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1655.0 | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1657.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "comment-body js-comment-edit-hide" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n \n ", | |
"id": 1659.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "comment-copy" }, | |
"childNodes": [ | |
{ | |
"id": 1661.0, | |
"type": 3.0, | |
"textContent": "Possible duplicate of " | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackoverflow.com/questions/54798102/calling-useval-several-times-in-a-single-function-with-arrays-unexpected-beh" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Calling `useVal` several times in a single function with arrays - unexpected behavior", | |
"id": 1663.0 | |
} | |
], | |
"id": 1662.0 | |
} | |
], | |
"id": 1660.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n \n ", | |
"id": 1664.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "d-inline-flex ai-center" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n– ", | |
"id": 1666.0 | |
}, | |
{ | |
"id": 1667.0, | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackoverflow.com/users/7495930/ryan-cogswell", | |
"title": "51,449 reputation", | |
"class": "comment-user" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Ryan Cogswell", | |
"id": 1668.0 | |
} | |
] | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1669.0 | |
} | |
], | |
"id": 1665.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1670.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { | |
"class": "comment-date", | |
"dir": "ltr" | |
}, | |
"childNodes": [ | |
{ | |
"tagName": "a", | |
"attributes": { | |
"class": "comment-link", | |
"href": "https://stackoverflow.com/questions/54824036/useeffect-hook-with-socket-io-state-is-not-persistent-in-socket-handlers#comment96428843_54824036" | |
}, | |
"childNodes": [ | |
{ | |
"attributes": { | |
"title": "2019-02-22 12:26:51Z, License: CC BY-SA 4.0", | |
"class": "relativetime-clean" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Feb 22 '19 at 12:26", | |
"id": 1674.0 | |
} | |
], | |
"id": 1673.0, | |
"type": 2.0, | |
"tagName": "span" | |
} | |
], | |
"id": 1672.0, | |
"type": 2.0 | |
} | |
], | |
"id": 1671.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1675.0 | |
} | |
], | |
"id": 1658.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1676.0 | |
} | |
], | |
"id": 1656.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "comment-text js-comment-text-and-form" | |
} | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 1677.0 } | |
] | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 1678.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": { | |
"data-comment-score": "0", | |
"id": "comment-96429370", | |
"class": "comment js-comment ", | |
"data-comment-id": "96429370", | |
"data-comment-owner-id": "6531461" | |
}, | |
"childNodes": [ | |
{ | |
"textContent": "\n ", | |
"id": 1680.0, | |
"type": 3.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "js-comment-actions comment-actions" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1682.0 | |
}, | |
{ | |
"id": 1683.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "comment-score js-comment-edit-hide" | |
}, | |
"childNodes": [ | |
{ | |
"textContent": "\n ", | |
"id": 1684.0, | |
"type": 3.0 | |
} | |
] | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1685.0 | |
} | |
], | |
"id": 1681.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1686.0 | |
}, | |
{ | |
"id": 1687.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "comment-text js-comment-text-and-form" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1688.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "comment-body js-comment-edit-hide" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n \n ", | |
"id": 1690.0 | |
}, | |
{ | |
"id": 1691.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "comment-copy" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "@RyanCogswell I'm not calling my setParticpants at any function multiple times, and the probelm isn't with the setParticipants its with reading the particpants state everytime a socket event callback gets called, the callbacks will fire multiple times as you see in the screenshot and every two times the state changes to empty without touching it.", | |
"id": 1692.0 | |
} | |
] | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n \n ", | |
"id": 1693.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "d-inline-flex ai-center" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n– ", | |
"id": 1695.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackoverflow.com/users/6531461/mo-hajr", | |
"title": "1,024 reputation", | |
"class": "comment-user owner" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Mo Hajr", | |
"id": 1697.0 | |
} | |
], | |
"id": 1696.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1698.0 | |
} | |
], | |
"id": 1694.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1699.0 | |
}, | |
{ | |
"id": 1700.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { | |
"class": "comment-date", | |
"dir": "ltr" | |
}, | |
"childNodes": [ | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"class": "comment-link", | |
"href": "https://stackoverflow.com/questions/54824036/useeffect-hook-with-socket-io-state-is-not-persistent-in-socket-handlers#comment96429370_54824036" | |
}, | |
"childNodes": [ | |
{ | |
"tagName": "span", | |
"attributes": { | |
"title": "2019-02-22 12:41:17Z, License: CC BY-SA 4.0", | |
"class": "relativetime-clean" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Feb 22 '19 at 12:41", | |
"id": 1703.0 | |
} | |
], | |
"id": 1702.0, | |
"type": 2.0 | |
} | |
], | |
"id": 1701.0 | |
} | |
] | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1704.0 | |
} | |
], | |
"id": 1689.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1705.0 | |
} | |
] | |
}, | |
{ "id": 1706.0, "type": 3.0, "textContent": "\n " } | |
], | |
"id": 1679.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 1707.0 }, | |
{ | |
"id": 1708.0, | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": { | |
"id": "comment-96429439", | |
"class": "comment js-comment ", | |
"data-comment-id": "96429439", | |
"data-comment-owner-id": "7495930", | |
"data-comment-score": "0" | |
}, | |
"childNodes": [ | |
{ | |
"textContent": "\n ", | |
"id": 1709.0, | |
"type": 3.0 | |
}, | |
{ | |
"attributes": { | |
"class": "js-comment-actions comment-actions" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1711.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "comment-score js-comment-edit-hide" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1713.0 | |
} | |
], | |
"id": 1712.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1714.0 | |
} | |
], | |
"id": 1710.0, | |
"type": 2.0, | |
"tagName": "div" | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1715.0 | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1717.0 | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n \n ", | |
"id": 1719.0 | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "In addition to not using the functional update syntax (see duplicate I mentioned), you are setting up your socket handler with each re-render without cleaning up the previous handler.", | |
"id": 1721.0 | |
} | |
], | |
"id": 1720.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "comment-copy" } | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n \n ", | |
"id": 1722.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "d-inline-flex ai-center" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n– ", | |
"id": 1724.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"href": "https://stackoverflow.com/users/7495930/ryan-cogswell", | |
"title": "51,449 reputation", | |
"class": "comment-user" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Ryan Cogswell", | |
"id": 1726.0 | |
} | |
], | |
"id": 1725.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1727.0 | |
} | |
], | |
"id": 1723.0 | |
}, | |
{ | |
"textContent": "\n ", | |
"id": 1728.0, | |
"type": 3.0 | |
}, | |
{ | |
"attributes": { | |
"dir": "ltr", | |
"class": "comment-date" | |
}, | |
"childNodes": [ | |
{ | |
"attributes": { | |
"class": "comment-link", | |
"href": "https://stackoverflow.com/questions/54824036/useeffect-hook-with-socket-io-state-is-not-persistent-in-socket-handlers#comment96429439_54824036" | |
}, | |
"childNodes": [ | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { | |
"title": "2019-02-22 12:43:04Z, License: CC BY-SA 4.0", | |
"class": "relativetime-clean" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Feb 22 '19 at 12:43", | |
"id": 1732.0 | |
} | |
], | |
"id": 1731.0 | |
} | |
], | |
"id": 1730.0, | |
"type": 2.0, | |
"tagName": "a" | |
} | |
], | |
"id": 1729.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ | |
"id": 1733.0, | |
"type": 3.0, | |
"textContent": "\n " | |
} | |
], | |
"id": 1718.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "comment-body js-comment-edit-hide" | |
} | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1734.0 | |
} | |
], | |
"id": 1716.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "comment-text js-comment-text-and-form" | |
} | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 1735.0 } | |
] | |
}, | |
{ | |
"textContent": "\n\n ", | |
"id": 1736.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1564.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": "\n\u0009 ", "id": 1737.0 } | |
] | |
}, | |
{ "type": 3.0, "textContent": "\n\n ", "id": 1738.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"id": "comments-link-54824036", | |
"data-rep": "50", | |
"data-reg": "true" | |
}, | |
"childNodes": [ | |
{ | |
"id": 1740.0, | |
"type": 3.0, | |
"textContent": "\n " | |
}, | |
{ | |
"tagName": "a", | |
"attributes": { | |
"class": "js-add-link comments-link dno", | |
"title": "Use comments to ask for more information or suggest improvements. Avoid answering questions in comments.", | |
"href": "https://stackoverflow.com/questions/54824036/useeffect-hook-with-socket-io-state-is-not-persistent-in-socket-handlers#", | |
"role": "button" | |
}, | |
"childNodes": [], | |
"id": 1741.0, | |
"type": 2.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1742.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "js-link-separator dno" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": " | ", "id": 1744.0 } | |
], | |
"id": 1743.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 1745.0 }, | |
{ | |
"id": 1746.0, | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"class": "js-show-link comments-link ", | |
"title": "Expand to show all comments on this post", | |
"href": "https://stackoverflow.com/questions/54824036/useeffect-hook-with-socket-io-state-is-not-persistent-in-socket-handlers#", | |
"onclick": "", | |
"role": "button" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "Show ", "id": 1747.0 }, | |
{ | |
"tagName": "b", | |
"attributes": {}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "6", "id": 1749.0 } | |
], | |
"id": 1748.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": " more comments", "id": 1750.0 } | |
] | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 1751.0 } | |
], | |
"id": 1739.0 | |
}, | |
{ "type": 3.0, "textContent": " \n ", "id": 1752.0 } | |
], | |
"id": 1560.0 | |
}, | |
{ "textContent": "\n ", "id": 1753.0, "type": 3.0 } | |
] | |
}, | |
{ "textContent": "\n", "id": 1754.0, "type": 3.0 } | |
], | |
"id": 886.0 | |
}, | |
{ "id": 1755.0, "type": 3.0, "textContent": "\n\n\n" }, | |
{ | |
"id": 1756.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "js-zone-container zone-container-responsive" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 1757.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"id": "dfp-isb", | |
"class": "everyonelovesstackoverflow everyoneloves__inline-sidebar mx-auto", | |
"style": "min-height: auto; height: auto; display: none;" | |
}, | |
"childNodes": [], | |
"id": 1758.0 | |
}, | |
{ "textContent": "\n ", "id": 1759.0, "type": 3.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "js-report-ad-button-container mx-auto", | |
"style": "width: 300px" | |
}, | |
"childNodes": [], | |
"id": 1760.0 | |
}, | |
{ "textContent": "\n", "id": 1761.0, "type": 3.0 } | |
] | |
}, | |
{ "type": 3.0, "textContent": "\n\n ", "id": 1762.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "id": "answers" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n\n ", "id": 1764.0 }, | |
{ | |
"attributes": { "name": "tab-top" }, | |
"childNodes": [], | |
"id": 1765.0, | |
"type": 2.0, | |
"tagName": "a" | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 1766.0 }, | |
{ | |
"id": 1767.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "id": "answers-header" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1768.0 | |
}, | |
{ | |
"tagName": "div", | |
"attributes": { "class": "answers-subheader d-flex ai-center mb8" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1770.0 | |
}, | |
{ | |
"id": 1771.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "flex--item fl1" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1772.0 | |
}, | |
{ | |
"attributes": { "class": "mb0", "data-answercount": "1" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n 1 Answer\n ", | |
"id": 1774.0 | |
}, | |
{ | |
"tagName": "span", | |
"attributes": { | |
"style": "display:none;", | |
"itemprop": "answerCount" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "1", "id": 1776.0 } | |
], | |
"id": 1775.0, | |
"type": 2.0 | |
}, | |
{ | |
"textContent": "\n ", | |
"id": 1777.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1773.0, | |
"type": 2.0, | |
"tagName": "h2" | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1778.0 | |
} | |
] | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1779.0 | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1781.0 | |
}, | |
{ | |
"id": 1782.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": " d-flex s-btn-group js-filter-btn" }, | |
"childNodes": [ | |
{ "textContent": "\n ", "id": 1783.0, "type": 3.0 }, | |
{ | |
"tagName": "a", | |
"attributes": { | |
"class": "flex--item s-btn s-btn__muted s-btn__outlined", | |
"href": "https://stackoverflow.com/questions/54824036/useeffect-hook-with-socket-io-state-is-not-persistent-in-socket-handlers?answertab=active#tab-top", | |
"data-nav-xhref": "", | |
"title": "Answers with the latest activity first", | |
"data-value": "active", | |
"data-shortcut": "A" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n Active", | |
"id": 1785.0 | |
} | |
], | |
"id": 1784.0, | |
"type": 2.0 | |
}, | |
{ "id": 1786.0, "type": 3.0, "textContent": "\n " }, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"class": "flex--item s-btn s-btn__muted s-btn__outlined", | |
"href": "https://stackoverflow.com/questions/54824036/useeffect-hook-with-socket-io-state-is-not-persistent-in-socket-handlers?answertab=oldest#tab-top", | |
"data-nav-xhref": "", | |
"title": "Answers in the order they were provided", | |
"data-value": "oldest", | |
"data-shortcut": "O" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n Oldest", | |
"id": 1788.0 | |
} | |
], | |
"id": 1787.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 1789.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { | |
"class": "youarehere is-selected flex--item s-btn s-btn__muted s-btn__outlined", | |
"href": "https://stackoverflow.com/questions/54824036/useeffect-hook-with-socket-io-state-is-not-persistent-in-socket-handlers?answertab=votes#tab-top", | |
"data-nav-xhref": "", | |
"title": "Answers with the highest score first", | |
"data-value": "votes", | |
"data-shortcut": "V" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n Votes", | |
"id": 1791.0 | |
} | |
], | |
"id": 1790.0 | |
}, | |
{ "id": 1792.0, "type": 3.0, "textContent": "\n" } | |
] | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n\n ", | |
"id": 1793.0 | |
} | |
], | |
"id": 1780.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "flex--item" } | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1794.0 | |
} | |
], | |
"id": 1769.0, | |
"type": 2.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n \n ", | |
"id": 1795.0 | |
} | |
] | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n\n\n \n", | |
"id": 1796.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "a", | |
"attributes": { "name": "54830805" }, | |
"childNodes": [], | |
"id": 1797.0 | |
}, | |
{ "type": 3.0, "textContent": "\n", "id": 1798.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"itemtype": "https://schema.org/Answer", | |
"id": "answer-54830805", | |
"data-answerid": "54830805", | |
"data-position-on-page": "1", | |
"data-question-has-accepted-highest-score": "1", | |
"itemprop": "acceptedAnswer", | |
"itemscope": "", | |
"class": "answer accepted-answer", | |
"data-score": "42", | |
"data-highest-scored": "1" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 1800.0 }, | |
{ | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 1802.0 }, | |
{ | |
"tagName": "div", | |
"attributes": { "class": "votecell post-layout--left" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 1804.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "js-voting-container d-flex jc-center fd-column ai-stretch gs4 fc-black-200", | |
"data-post-id": "54830805" | |
}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n ", "id": 1806.0 }, | |
{ | |
"attributes": { | |
"data-unselected-classes": "", | |
"aria-describedby": "--stacks-s-tooltip-xe6ojc2q", | |
"class": "js-vote-up-btn flex--item s-btn s-btn__unset c-pointer ", | |
"data-controller": "s-tooltip", | |
"data-s-tooltip-placement": "right", | |
"aria-pressed": "false", | |
"aria-label": "Up vote", | |
"data-selected-classes": "fc-theme-primary" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1808.0 | |
}, | |
{ | |
"isSVG": true, | |
"id": 1809.0, | |
"type": 2.0, | |
"tagName": "svg", | |
"attributes": { | |
"aria-hidden": "true", | |
"class": "svg-icon iconArrowUpLg", | |
"width": "36", | |
"height": "36", | |
"viewBox": "0 0 36 36" | |
}, | |
"childNodes": [ | |
{ | |
"type": 2.0, | |
"tagName": "path", | |
"attributes": { "d": "M2 26h32L18 10 2 26Z" }, | |
"childNodes": [], | |
"id": 1810.0 | |
} | |
] | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 1811.0 } | |
], | |
"id": 1807.0, | |
"type": 2.0, | |
"tagName": "button" | |
}, | |
{ | |
"id": 1812.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"id": "--stacks-s-tooltip-xe6ojc2q", | |
"class": "s-popover s-popover__tooltip pe-none", | |
"aria-hidden": "true", | |
"role": "tooltip" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "This answer is useful", | |
"id": 1813.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "s-popover--arrow" }, | |
"childNodes": [], | |
"id": 1814.0 | |
} | |
] | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 1815.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "js-vote-count flex--item d-flex fd-column ai-center fc-black-500 fs-title", | |
"itemprop": "upvoteCount", | |
"data-value": "42" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n 42\n ", | |
"id": 1817.0 | |
} | |
], | |
"id": 1816.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 1818.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "button", | |
"attributes": { | |
"data-unselected-classes": "", | |
"aria-describedby": "--stacks-s-tooltip-asmgf8ds", | |
"class": "js-vote-down-btn flex--item s-btn s-btn__unset c-pointer ", | |
"data-controller": "s-tooltip", | |
"data-s-tooltip-placement": "right", | |
"aria-pressed": "false", | |
"aria-label": "Down vote", | |
"data-selected-classes": "fc-theme-primary" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1820.0 | |
}, | |
{ | |
"isSVG": true, | |
"id": 1821.0, | |
"type": 2.0, | |
"tagName": "svg", | |
"attributes": { | |
"aria-hidden": "true", | |
"class": "svg-icon iconArrowDownLg", | |
"width": "36", | |
"height": "36", | |
"viewBox": "0 0 36 36" | |
}, | |
"childNodes": [ | |
{ | |
"type": 2.0, | |
"tagName": "path", | |
"attributes": { "d": "M2 10h32L18 26 2 10Z" }, | |
"childNodes": [], | |
"id": 1822.0 | |
} | |
] | |
}, | |
{ "id": 1823.0, "type": 3.0, "textContent": "\n " } | |
], | |
"id": 1819.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"class": "s-popover s-popover__tooltip pe-none", | |
"aria-hidden": "true", | |
"role": "tooltip", | |
"id": "--stacks-s-tooltip-asmgf8ds" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "This answer is not useful", | |
"id": 1825.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "s-popover--arrow" }, | |
"childNodes": [], | |
"id": 1826.0 | |
} | |
], | |
"id": 1824.0 | |
}, | |
{ | |
"textContent": "\n\n \n ", | |
"id": 1827.0, | |
"type": 3.0 | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1829.0 | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1831.0 | |
}, | |
{ | |
"id": 1832.0, | |
"type": 2.0, | |
"tagName": "svg", | |
"attributes": { | |
"aria-hidden": "true", | |
"class": "svg-icon iconCheckmarkLg", | |
"width": "36", | |
"height": "36", | |
"viewBox": "0 0 36 36" | |
}, | |
"childNodes": [ | |
{ | |
"tagName": "path", | |
"attributes": { | |
"d": "m6 14 8 8L30 6v8L14 30l-8-8v-8Z" | |
}, | |
"childNodes": [], | |
"id": 1833.0, | |
"type": 2.0 | |
} | |
], | |
"isSVG": true | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1834.0 | |
} | |
], | |
"id": 1830.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { "class": "ta-center" } | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1835.0 | |
} | |
], | |
"id": 1828.0, | |
"type": 2.0, | |
"tagName": "div", | |
"attributes": { | |
"aria-label": "Accepted", | |
"class": "js-accepted-answer-indicator flex--item fc-green-500 py6 mtn8", | |
"data-s-tooltip-placement": "right", | |
"title": "Loading when this answer was accepted…", | |
"tabindex": "0", | |
"role": "note" | |
} | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n\n \n ", | |
"id": 1836.0 | |
}, | |
{ | |
"attributes": { | |
"aria-label": "Timeline", | |
"aria-describedby": "--stacks-s-tooltip-6iavec9o", | |
"class": "js-post-issue flex--item s-btn s-btn__unset c-pointer py6 mx-auto", | |
"href": "https://stackoverflow.com/posts/54830805/timeline", | |
"data-shortcut": "T", | |
"data-ks-title": "timeline", | |
"data-controller": "s-tooltip", | |
"data-s-tooltip-placement": "right" | |
}, | |
"childNodes": [ | |
{ | |
"isSVG": true, | |
"id": 1838.0, | |
"type": 2.0, | |
"tagName": "svg", | |
"attributes": { | |
"aria-hidden": "true", | |
"class": "mln2 mr0 svg-icon iconHistory", | |
"width": "19", | |
"height": "18", | |
"viewBox": "0 0 19 18" | |
}, | |
"childNodes": [ | |
{ | |
"childNodes": [], | |
"id": 1839.0, | |
"type": 2.0, | |
"tagName": "path", | |
"attributes": { | |
"d": "M3 9a8 8 0 113.73 6.77L8.2 14.3A6 6 0 105 9l3.01-.01-4 4-4-4h3L3 9Zm7-4h1.01L11 9.36l3.22 2.1-.6.93L10 10V5Z" | |
} | |
} | |
] | |
} | |
], | |
"id": 1837.0, | |
"type": 2.0, | |
"tagName": "a" | |
}, | |
{ | |
"tagName": "div", | |
"attributes": { | |
"class": "s-popover s-popover__tooltip pe-none", | |
"aria-hidden": "true", | |
"role": "tooltip", | |
"id": "--stacks-s-tooltip-6iavec9o" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Show activity on this post.", | |
"id": 1841.0 | |
}, | |
{ | |
"attributes": { "class": "s-popover--arrow" }, | |
"childNodes": [], | |
"id": 1842.0, | |
"type": 2.0, | |
"tagName": "div" | |
} | |
], | |
"id": 1840.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": "\n\n", "id": 1843.0 } | |
], | |
"id": 1805.0 | |
}, | |
{ "type": 3.0, "textContent": "\n\n ", "id": 1844.0 } | |
], | |
"id": 1803.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": "\n\n \n\n", "id": 1845.0 }, | |
{ | |
"attributes": { "class": "answercell post-layout--right" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n \n ", "id": 1847.0 }, | |
{ | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n", "id": 1849.0 }, | |
{ | |
"childNodes": [ | |
{ | |
"textContent": "The difficult thing about this is that you had several issues interacting with one another that were confusing your troubleshooting.", | |
"id": 1851.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1850.0, | |
"type": 2.0, | |
"tagName": "p", | |
"attributes": {} | |
}, | |
{ "type": 3.0, "textContent": "\n\n", "id": 1852.0 }, | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "The biggest issue is that you are setting up multiple socket event handlers. Each re-render, you are calling ", | |
"id": 1854.0 | |
}, | |
{ | |
"tagName": "code", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "socket.on", | |
"id": 1856.0 | |
} | |
], | |
"id": 1855.0, | |
"type": 2.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " without having ever called ", | |
"id": 1857.0 | |
}, | |
{ | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "socket.off", | |
"id": 1859.0 | |
} | |
], | |
"id": 1858.0, | |
"type": 2.0, | |
"tagName": "code" | |
}, | |
{ "type": 3.0, "textContent": ". ", "id": 1860.0 } | |
], | |
"id": 1853.0, | |
"type": 2.0, | |
"tagName": "p", | |
"attributes": {} | |
}, | |
{ "textContent": "\n\n", "id": 1861.0, "type": 3.0 }, | |
{ | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "There are three main approaches I can picture for how to handle this:", | |
"id": 1863.0 | |
} | |
], | |
"id": 1862.0, | |
"type": 2.0, | |
"tagName": "p" | |
}, | |
{ "type": 3.0, "textContent": "\n\n", "id": 1864.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "ul", | |
"attributes": {}, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "\n", "id": 1866.0 }, | |
{ | |
"tagName": "li", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"id": 1868.0, | |
"type": 2.0, | |
"tagName": "p", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Set up a single socket event handler and only use ", | |
"id": 1869.0 | |
}, | |
{ | |
"tagName": "a", | |
"attributes": { | |
"href": "https://reactjs.org/docs/hooks-reference.html#functional-updates", | |
"rel": "noreferrer" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "functional updates", | |
"id": 1871.0 | |
} | |
], | |
"id": 1870.0, | |
"type": 2.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " for the ", | |
"id": 1872.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "code", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "participants", | |
"id": 1874.0 | |
} | |
], | |
"id": 1873.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " state. With this approach, you would use an empty dependency array for ", | |
"id": 1875.0 | |
}, | |
{ | |
"tagName": "code", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"id": 1877.0, | |
"type": 3.0, | |
"textContent": "useEffect" | |
} | |
], | |
"id": 1876.0, | |
"type": 2.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ", and you would not reference ", | |
"id": 1878.0 | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"id": 1880.0, | |
"type": 3.0, | |
"textContent": "participants" | |
} | |
], | |
"id": 1879.0, | |
"type": 2.0, | |
"tagName": "code", | |
"attributes": {} | |
}, | |
{ "id": 1881.0, "type": 3.0, "textContent": " " }, | |
{ | |
"childNodes": [ | |
{ | |
"textContent": "anywhere", | |
"id": 1883.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1882.0, | |
"type": 2.0, | |
"tagName": "strong", | |
"attributes": {} | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " within your effect (including all of the methods called by your message handler). If you do reference ", | |
"id": 1884.0 | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"textContent": "participants", | |
"id": 1886.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1885.0, | |
"type": 2.0, | |
"tagName": "code", | |
"attributes": {} | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " you'll be referencing an old version of it once the first re-render occurs. If the changes that need to occur to ", | |
"id": 1887.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "code", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "participants", | |
"id": 1889.0 | |
} | |
], | |
"id": 1888.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " can easily be done using functional updates, then this might be the simplest approach.", | |
"id": 1890.0 | |
} | |
] | |
} | |
], | |
"id": 1867.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": "\n", "id": 1891.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"id": 1893.0, | |
"type": 2.0, | |
"tagName": "p", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Set up a new socket event handler with each change to ", | |
"id": 1894.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "code", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "participants", | |
"id": 1896.0 | |
} | |
], | |
"id": 1895.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ". In order for this to work correctly, ", | |
"id": 1897.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "strong", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"textContent": "you need to remove the previous event handler", | |
"id": 1899.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1898.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " otherwise you will have the same number of event handlers as renders. When you have multiple event handlers, the first one that was created would always use the first version of ", | |
"id": 1900.0 | |
}, | |
{ | |
"tagName": "code", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "participants", | |
"id": 1902.0 | |
} | |
], | |
"id": 1901.0, | |
"type": 2.0 | |
}, | |
{ | |
"textContent": " (empty), the second one would always use the second version of ", | |
"id": 1903.0, | |
"type": 3.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "code", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "participants", | |
"id": 1905.0 | |
} | |
], | |
"id": 1904.0 | |
}, | |
{ | |
"textContent": ", etc. This will work and gives more flexibility in how you can use the existing ", | |
"id": 1906.0, | |
"type": 3.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "code", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"textContent": "participants", | |
"id": 1908.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1907.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " state, but has the down side of repeatedly tearing down and setting up socket event handlers which feels clunky.", | |
"id": 1909.0 | |
} | |
] | |
} | |
], | |
"id": 1892.0 | |
}, | |
{ "type": 3.0, "textContent": "\n", "id": 1910.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "li", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"tagName": "p", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Set up a single socket event handler and use a ref to get access to the current ", | |
"id": 1913.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "code", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"id": 1915.0, | |
"type": 3.0, | |
"textContent": "participants" | |
} | |
], | |
"id": 1914.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " state. This is similar to the first approach, but adds an additional effect that executes on every render to set the current ", | |
"id": 1916.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "code", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "participants", | |
"id": 1918.0 | |
} | |
], | |
"id": 1917.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " state into a ref so that it can be accessed reliably by the message handler.", | |
"id": 1919.0 | |
} | |
], | |
"id": 1912.0, | |
"type": 2.0 | |
} | |
], | |
"id": 1911.0 | |
}, | |
{ "type": 3.0, "textContent": "\n", "id": 1920.0 } | |
], | |
"id": 1865.0 | |
}, | |
{ "type": 3.0, "textContent": "\n\n", "id": 1921.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "p", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Whichever approach you use, I think you will have an easier time reasoning about what the code is doing if you move your message handler out of your rendering function and pass in its dependencies explicitly.", | |
"id": 1923.0 | |
} | |
], | |
"id": 1922.0 | |
}, | |
{ "type": 3.0, "textContent": "\n\n", "id": 1924.0 }, | |
{ | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"textContent": "The third option provides the same kind of flexibility as the second option while avoiding repeated setup of the socket event handler, but adds a little bit of complexity with managing the ", | |
"id": 1926.0, | |
"type": 3.0 | |
}, | |
{ | |
"tagName": "code", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "participantsRef", | |
"id": 1928.0 | |
} | |
], | |
"id": 1927.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": ".", "id": 1929.0 } | |
], | |
"id": 1925.0, | |
"type": 2.0, | |
"tagName": "p" | |
}, | |
{ "id": 1930.0, "type": 3.0, "textContent": "\n\n" }, | |
{ | |
"id": 1931.0, | |
"type": 2.0, | |
"tagName": "p", | |
"attributes": {}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "Here's what the code would look like with the third option (I haven't tried to execute this, so I make no guarantees that I don't have minor syntax issues):", | |
"id": 1932.0 | |
} | |
] | |
}, | |
{ "type": 3.0, "textContent": "\n\n", "id": 1933.0 }, | |
{ | |
"attributes": { "class": "lang-js s-code-block" }, | |
"childNodes": [ | |
{ | |
"type": 2.0, | |
"tagName": "code", | |
"attributes": { "class": "hljs language-javascript" }, | |
"childNodes": [ | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" }, | |
"childNodes": [ | |
{ | |
"id": 1937.0, | |
"type": 3.0, | |
"textContent": "const" | |
} | |
], | |
"id": 1936.0 | |
}, | |
{ "type": 3.0, "textContent": " ", "id": 1938.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"id": 1940.0, | |
"type": 3.0, | |
"textContent": "messageHandler" | |
} | |
], | |
"id": 1939.0 | |
}, | |
{ "type": 3.0, "textContent": " = (", "id": 1941.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-params" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "message, participants, setParticipants", | |
"id": 1943.0 | |
} | |
], | |
"id": 1942.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ") =\u003e {\n ", | |
"id": 1944.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { | |
"class": "hljs-variable language_" | |
}, | |
"childNodes": [ | |
{ | |
"textContent": "console", | |
"id": 1946.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1945.0 | |
}, | |
{ "type": 3.0, "textContent": ".", "id": 1947.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "log", | |
"id": 1949.0 | |
} | |
], | |
"id": 1948.0 | |
}, | |
{ "type": 3.0, "textContent": "(", "id": 1950.0 }, | |
{ | |
"tagName": "span", | |
"attributes": { "class": "hljs-string" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "'Message received: '", | |
"id": 1952.0 | |
} | |
], | |
"id": 1951.0, | |
"type": 2.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " + message.", | |
"id": 1953.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-property" }, | |
"childNodes": [ | |
{ | |
"id": 1955.0, | |
"type": 3.0, | |
"textContent": "event" | |
} | |
], | |
"id": 1954.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ");\n\n ", | |
"id": 1956.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" }, | |
"childNodes": [ | |
{ | |
"textContent": "const", | |
"id": 1958.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1957.0 | |
}, | |
{ "id": 1959.0, "type": 3.0, "textContent": " " }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"textContent": "onExistingParticipants", | |
"id": 1961.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1960.0 | |
}, | |
{ "type": 3.0, "textContent": " = (", "id": 1962.0 }, | |
{ | |
"attributes": { "class": "hljs-params" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "userid, existingUsers", | |
"id": 1964.0 | |
} | |
], | |
"id": 1963.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ") =\u003e {\n ", | |
"id": 1965.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { | |
"class": "hljs-variable language_" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "console", | |
"id": 1967.0 | |
} | |
], | |
"id": 1966.0 | |
}, | |
{ "type": 3.0, "textContent": ".", "id": 1968.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "log", | |
"id": 1970.0 | |
} | |
], | |
"id": 1969.0 | |
}, | |
{ "id": 1971.0, "type": 3.0, "textContent": "(" }, | |
{ | |
"tagName": "span", | |
"attributes": { "class": "hljs-string" }, | |
"childNodes": [ | |
{ | |
"textContent": "'onExistingParticipants Called!!!!!'", | |
"id": 1973.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1972.0, | |
"type": 2.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ");\n\n ", | |
"id": 1974.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-comment" }, | |
"childNodes": [ | |
{ | |
"textContent": "//Add local User", | |
"id": 1976.0, | |
"type": 3.0 | |
} | |
], | |
"id": 1975.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n ", | |
"id": 1977.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" }, | |
"childNodes": [ | |
{ | |
"id": 1979.0, | |
"type": 3.0, | |
"textContent": "const" | |
} | |
], | |
"id": 1978.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " user = {\n ", | |
"id": 1980.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-attr" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "id", "id": 1982.0 } | |
], | |
"id": 1981.0 | |
}, | |
{ | |
"id": 1983.0, | |
"type": 3.0, | |
"textContent": ": userid,\n " | |
}, | |
{ | |
"tagName": "span", | |
"attributes": { "class": "hljs-attr" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "username", | |
"id": 1985.0 | |
} | |
], | |
"id": 1984.0, | |
"type": 2.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ": userName,\n ", | |
"id": 1986.0 | |
}, | |
{ | |
"attributes": { "class": "hljs-attr" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "published", | |
"id": 1988.0 | |
} | |
], | |
"id": 1987.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ "textContent": ": ", "id": 1989.0, "type": 3.0 }, | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "true", | |
"id": 1991.0 | |
} | |
], | |
"id": 1990.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-literal" } | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ",\n ", | |
"id": 1992.0 | |
}, | |
{ | |
"tagName": "span", | |
"attributes": { "class": "hljs-attr" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "rtcPeer", | |
"id": 1994.0 | |
} | |
], | |
"id": 1993.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": ": ", "id": 1995.0 }, | |
{ | |
"tagName": "span", | |
"attributes": { "class": "hljs-literal" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "null", | |
"id": 1997.0 | |
} | |
], | |
"id": 1996.0, | |
"type": 2.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n };\n\n ", | |
"id": 1998.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"id": 2000.0, | |
"type": 3.0, | |
"textContent": "setParticipants" | |
} | |
], | |
"id": 1999.0 | |
}, | |
{ | |
"textContent": "({\n ...participants,\n [user.", | |
"id": 2001.0, | |
"type": 3.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-property" }, | |
"childNodes": [ | |
{ "id": 2003.0, "type": 3.0, "textContent": "id" } | |
], | |
"id": 2002.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "]: user\n });\n\n existingUsers.", | |
"id": 2004.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "forEach", | |
"id": 2006.0 | |
} | |
], | |
"id": 2005.0 | |
}, | |
{ "textContent": "(", "id": 2007.0, "type": 3.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "function", | |
"id": 2009.0 | |
} | |
], | |
"id": 2008.0 | |
}, | |
{ "textContent": " (", "id": 2010.0, "type": 3.0 }, | |
{ | |
"attributes": { "class": "hljs-params" }, | |
"childNodes": [ | |
{ | |
"id": 2012.0, | |
"type": 3.0, | |
"textContent": "element" | |
} | |
], | |
"id": 2011.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ") {\n ", | |
"id": 2013.0 | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "receiveVideo", | |
"id": 2015.0 | |
} | |
], | |
"id": 2014.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" } | |
}, | |
{ | |
"textContent": "(element.", | |
"id": 2016.0, | |
"type": 3.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-property" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "id", "id": 2018.0 } | |
], | |
"id": 2017.0 | |
}, | |
{ | |
"textContent": ", element.", | |
"id": 2019.0, | |
"type": 3.0 | |
}, | |
{ | |
"attributes": { "class": "hljs-property" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "name", | |
"id": 2021.0 | |
} | |
], | |
"id": 2020.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ")\n })\n };\n\n ", | |
"id": 2022.0 | |
}, | |
{ | |
"attributes": { "class": "hljs-keyword" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "const", | |
"id": 2024.0 | |
} | |
], | |
"id": 2023.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ "type": 3.0, "textContent": " ", "id": 2025.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "onReceiveVideoAnswer", | |
"id": 2027.0 | |
} | |
], | |
"id": 2026.0 | |
}, | |
{ "textContent": " = (", "id": 2028.0, "type": 3.0 }, | |
{ | |
"childNodes": [ | |
{ | |
"id": 2030.0, | |
"type": 3.0, | |
"textContent": "senderid, sdpAnswer" | |
} | |
], | |
"id": 2029.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-params" } | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ") =\u003e {\n ", | |
"id": 2031.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { | |
"class": "hljs-variable language_" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "console", | |
"id": 2033.0 | |
} | |
], | |
"id": 2032.0 | |
}, | |
{ "type": 3.0, "textContent": ".", "id": 2034.0 }, | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "log", | |
"id": 2036.0 | |
} | |
], | |
"id": 2035.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" } | |
}, | |
{ "type": 3.0, "textContent": "(", "id": 2037.0 }, | |
{ | |
"tagName": "span", | |
"attributes": { "class": "hljs-string" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "'participants in Receive answer -\u003e '", | |
"id": 2039.0 | |
} | |
], | |
"id": 2038.0, | |
"type": 2.0 | |
}, | |
{ | |
"id": 2040.0, | |
"type": 3.0, | |
"textContent": ", participants);\n " | |
}, | |
{ | |
"attributes": { | |
"class": "hljs-variable language_" | |
}, | |
"childNodes": [ | |
{ | |
"id": 2042.0, | |
"type": 3.0, | |
"textContent": "console" | |
} | |
], | |
"id": 2041.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ "type": 3.0, "textContent": ".", "id": 2043.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"textContent": "log", | |
"id": 2045.0, | |
"type": 3.0 | |
} | |
], | |
"id": 2044.0 | |
}, | |
{ "type": 3.0, "textContent": "(", "id": 2046.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-string" }, | |
"childNodes": [ | |
{ | |
"textContent": "'***************'", | |
"id": 2048.0, | |
"type": 3.0 | |
} | |
], | |
"id": 2047.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ")\n\n ", | |
"id": 2049.0 | |
}, | |
{ | |
"tagName": "span", | |
"attributes": { "class": "hljs-comment" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "// participants[senderid].rtcPeer.processAnswer(sdpAnswer)", | |
"id": 2051.0 | |
} | |
], | |
"id": 2050.0, | |
"type": 2.0 | |
}, | |
{ | |
"textContent": "\n };\n\n ", | |
"id": 2052.0, | |
"type": 3.0 | |
}, | |
{ | |
"id": 2053.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "const", | |
"id": 2054.0 | |
} | |
] | |
}, | |
{ "textContent": " ", "id": 2055.0, "type": 3.0 }, | |
{ | |
"id": 2056.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "addIceCandidate", | |
"id": 2057.0 | |
} | |
] | |
}, | |
{ "type": 3.0, "textContent": " = (", "id": 2058.0 }, | |
{ | |
"id": 2059.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-params" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "userid, candidate", | |
"id": 2060.0 | |
} | |
] | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ") =\u003e {\n ", | |
"id": 2061.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { | |
"class": "hljs-variable language_" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "console", | |
"id": 2063.0 | |
} | |
], | |
"id": 2062.0 | |
}, | |
{ "type": 3.0, "textContent": ".", "id": 2064.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "log", | |
"id": 2066.0 | |
} | |
], | |
"id": 2065.0 | |
}, | |
{ "type": 3.0, "textContent": "(", "id": 2067.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-string" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "'participants in Receive canditate -\u003e '", | |
"id": 2069.0 | |
} | |
], | |
"id": 2068.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ", participants);\n ", | |
"id": 2070.0 | |
}, | |
{ | |
"attributes": { | |
"class": "hljs-variable language_" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "console", | |
"id": 2072.0 | |
} | |
], | |
"id": 2071.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ "type": 3.0, "textContent": ".", "id": 2073.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "log", | |
"id": 2075.0 | |
} | |
], | |
"id": 2074.0 | |
}, | |
{ "type": 3.0, "textContent": "(", "id": 2076.0 }, | |
{ | |
"tagName": "span", | |
"attributes": { "class": "hljs-string" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "'***************'", | |
"id": 2078.0 | |
} | |
], | |
"id": 2077.0, | |
"type": 2.0 | |
}, | |
{ | |
"textContent": ");\n ", | |
"id": 2079.0, | |
"type": 3.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-comment" }, | |
"childNodes": [ | |
{ | |
"textContent": "// participants[userid].rtcPeer.addIceCandidate(candidate)", | |
"id": 2081.0, | |
"type": 3.0 | |
} | |
], | |
"id": 2080.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n };\n\n ", | |
"id": 2082.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "const", | |
"id": 2084.0 | |
} | |
], | |
"id": 2083.0 | |
}, | |
{ "type": 3.0, "textContent": " ", "id": 2085.0 }, | |
{ | |
"id": 2086.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "receiveVideo", | |
"id": 2087.0 | |
} | |
] | |
}, | |
{ "type": 3.0, "textContent": " = (", "id": 2088.0 }, | |
{ | |
"attributes": { "class": "hljs-params" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "userid, username", | |
"id": 2090.0 | |
} | |
], | |
"id": 2089.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ") =\u003e {\n ", | |
"id": 2091.0 | |
}, | |
{ | |
"id": 2092.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { | |
"class": "hljs-variable language_" | |
}, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "console", | |
"id": 2093.0 | |
} | |
] | |
}, | |
{ "id": 2094.0, "type": 3.0, "textContent": "." }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"id": 2096.0, | |
"type": 3.0, | |
"textContent": "log" | |
} | |
], | |
"id": 2095.0 | |
}, | |
{ "type": 3.0, "textContent": "(", "id": 2097.0 }, | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "'Received Video Called!!!!'", | |
"id": 2099.0 | |
} | |
], | |
"id": 2098.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-string" } | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ");\n ", | |
"id": 2100.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-comment" }, | |
"childNodes": [ | |
{ | |
"textContent": "//Add remote User", | |
"id": 2102.0, | |
"type": 3.0 | |
} | |
], | |
"id": 2101.0 | |
}, | |
{ | |
"textContent": "\n ", | |
"id": 2103.0, | |
"type": 3.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "const", | |
"id": 2105.0 | |
} | |
], | |
"id": 2104.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": " user = {\n ", | |
"id": 2106.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-attr" }, | |
"childNodes": [ | |
{ "type": 3.0, "textContent": "id", "id": 2108.0 } | |
], | |
"id": 2107.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ": userid,\n ", | |
"id": 2109.0 | |
}, | |
{ | |
"id": 2110.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-attr" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "username", | |
"id": 2111.0 | |
} | |
] | |
}, | |
{ | |
"id": 2112.0, | |
"type": 3.0, | |
"textContent": ": username,\n " | |
}, | |
{ | |
"tagName": "span", | |
"attributes": { "class": "hljs-attr" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "published", | |
"id": 2114.0 | |
} | |
], | |
"id": 2113.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": ": ", "id": 2115.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-literal" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "false", | |
"id": 2117.0 | |
} | |
], | |
"id": 2116.0 | |
}, | |
{ | |
"textContent": ",\n ", | |
"id": 2118.0, | |
"type": 3.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-attr" }, | |
"childNodes": [ | |
{ | |
"id": 2120.0, | |
"type": 3.0, | |
"textContent": "rtcPeer" | |
} | |
], | |
"id": 2119.0 | |
}, | |
{ "type": 3.0, "textContent": ": ", "id": 2121.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-literal" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "null", | |
"id": 2123.0 | |
} | |
], | |
"id": 2122.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n };\n\n ", | |
"id": 2124.0 | |
}, | |
{ | |
"id": 2125.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "setParticipants", | |
"id": 2126.0 | |
} | |
] | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "({\n ...participants,\n [user.", | |
"id": 2127.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-property" }, | |
"childNodes": [ | |
{ "id": 2129.0, "type": 3.0, "textContent": "id" } | |
], | |
"id": 2128.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "]: user\n });\n };\n\n ", | |
"id": 2130.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-comment" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "//Callback for setting rtcPeer after creating it in child component", | |
"id": 2132.0 | |
} | |
], | |
"id": 2131.0 | |
}, | |
{ "type": 3.0, "textContent": "\n ", "id": 2133.0 }, | |
{ | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "const", | |
"id": 2135.0 | |
} | |
], | |
"id": 2134.0, | |
"type": 2.0 | |
}, | |
{ "type": 3.0, "textContent": " ", "id": 2136.0 }, | |
{ | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "setRtcPeerForUser", | |
"id": 2138.0 | |
} | |
], | |
"id": 2137.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ "type": 3.0, "textContent": " = (", "id": 2139.0 }, | |
{ | |
"attributes": { "class": "hljs-params" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "userid, rtcPeer", | |
"id": 2141.0 | |
} | |
], | |
"id": 2140.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ") =\u003e {\n ", | |
"id": 2142.0 | |
}, | |
{ | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"textContent": "setParticipants", | |
"id": 2144.0, | |
"type": 3.0 | |
} | |
], | |
"id": 2143.0, | |
"type": 2.0 | |
}, | |
{ | |
"id": 2145.0, | |
"type": 3.0, | |
"textContent": "({\n ...participants,\n [userid]: {...participants[userid], " | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-attr" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "rtcPeer", | |
"id": 2147.0 | |
} | |
], | |
"id": 2146.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ": rtcPeer}\n });\n };\n\n ", | |
"id": 2148.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "switch", | |
"id": 2150.0 | |
} | |
], | |
"id": 2149.0 | |
}, | |
{ | |
"textContent": " (message.", | |
"id": 2151.0, | |
"type": 3.0 | |
}, | |
{ | |
"id": 2152.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-property" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "event", | |
"id": 2153.0 | |
} | |
] | |
}, | |
{ | |
"id": 2154.0, | |
"type": 3.0, | |
"textContent": ") {\n " | |
}, | |
{ | |
"attributes": { "class": "hljs-keyword" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "case", | |
"id": 2156.0 | |
} | |
], | |
"id": 2155.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ "type": 3.0, "textContent": " ", "id": 2157.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-string" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "'newParticipantArrived'", | |
"id": 2159.0 | |
} | |
], | |
"id": 2158.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ":\n ", | |
"id": 2160.0 | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "receiveVideo", | |
"id": 2162.0 | |
} | |
], | |
"id": 2161.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" } | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "(message.", | |
"id": 2163.0 | |
}, | |
{ | |
"attributes": { "class": "hljs-property" }, | |
"childNodes": [ | |
{ | |
"textContent": "userid", | |
"id": 2165.0, | |
"type": 3.0 | |
} | |
], | |
"id": 2164.0, | |
"type": 2.0, | |
"tagName": "span" | |
}, | |
{ | |
"id": 2166.0, | |
"type": 3.0, | |
"textContent": ", message." | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-property" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "username", | |
"id": 2168.0 | |
} | |
], | |
"id": 2167.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ");\n ", | |
"id": 2169.0 | |
}, | |
{ | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "break", | |
"id": 2171.0 | |
} | |
], | |
"id": 2170.0, | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" } | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ";\n ", | |
"id": 2172.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "case", | |
"id": 2174.0 | |
} | |
], | |
"id": 2173.0 | |
}, | |
{ "type": 3.0, "textContent": " ", "id": 2175.0 }, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-string" }, | |
"childNodes": [ | |
{ | |
"textContent": "'existingParticipants'", | |
"id": 2177.0, | |
"type": 3.0 | |
} | |
], | |
"id": 2176.0 | |
}, | |
{ | |
"textContent": ":\n ", | |
"id": 2178.0, | |
"type": 3.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-title function_" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "onExistingParticipants", | |
"id": 2180.0 | |
} | |
], | |
"id": 2179.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "(\n message.", | |
"id": 2181.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-property" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "userid", | |
"id": 2183.0 | |
} | |
], | |
"id": 2182.0 | |
}, | |
{ | |
"textContent": ",\n message.", | |
"id": 2184.0, | |
"type": 3.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-property" }, | |
"childNodes": [ | |
{ | |
"id": 2186.0, | |
"type": 3.0, | |
"textContent": "existingUsers" | |
} | |
], | |
"id": 2185.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": "\n );\n ", | |
"id": 2187.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "break", | |
"id": 2189.0 | |
} | |
], | |
"id": 2188.0 | |
}, | |
{ | |
"type": 3.0, | |
"textContent": ";\n ", | |
"id": 2190.0 | |
}, | |
{ | |
"type": 2.0, | |
"tagName": "span", | |
"attributes": { "class": "hljs-keyword" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
"textContent": "case", | |
"id": 2192.0 | |
} | |
], | |
"id": 2191.0 | |
}, | |
{ "textContent": " ", "id": 2193.0, "type": 3.0 }, | |
{ | |
"tagName": "span", | |
"attributes": { "class": "hljs-string" }, | |
"childNodes": [ | |
{ | |
"type": 3.0, | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment