{"id":15731549,"url":"https://github.com/tuchk4/onblurexample","last_synced_at":"2025-03-31T02:49:04.655Z","repository":{"id":74998254,"uuid":"82556587","full_name":"tuchk4/onBlurExample","owner":"tuchk4","description":null,"archived":false,"fork":false,"pushed_at":"2017-07-24T10:02:56.000Z","size":487,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-06T07:46:46.951Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tuchk4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-20T12:41:40.000Z","updated_at":"2017-02-20T12:43:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"58ecbe98-2f87-44cc-8625-4a74db925d5c","html_url":"https://github.com/tuchk4/onBlurExample","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"8cc24349134a23c7574c04050d165a2f191bcee2"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuchk4%2FonBlurExample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuchk4%2FonBlurExample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuchk4%2FonBlurExample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuchk4%2FonBlurExample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tuchk4","download_url":"https://codeload.github.com/tuchk4/onBlurExample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246408101,"owners_count":20772229,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-04T00:02:09.949Z","updated_at":"2025-03-31T02:49:04.637Z","avatar_url":"https://github.com/tuchk4.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Repository was created as the example for SO question.\n\n* Live: https://tuchk4.github.io/onBlurExample\n* StackOverflow: http://stackoverflow.com/questions/42345043/react-render-performance-with-both-onblur-and-onfocus\n\n\u003e In this example - \"render\" is a time between parent component constructor and componentDidMount.\n(Parent component - I mean buttons list wrapper)\n\nOpen console at devtools. Steps:\n\nRender 1000 buttons with onFocus:\n\n* Reload\n* Click \"FOCUS\"\n\nrender ~0.02 (OK)\n\n---\n\nRender 1000 buttons with onBlur:\n\n* Reload\n* Click \"BLUR\"\n\nrender  ~0.02 (OK)\n\n---\n\nRender 1000 buttons with both onFocus and onBlur:\n\n\n* Reload\n* Click \"BOTH\"\n\n**render ~0.3** (Strange)\n\n---\n\nRe-Render 1000 buttons with both onFocus and onBlur:\n\n* Reload\n* Click \"BOTH\"\n* **(~0.3 sec)** (Strange)\n* Click \"Clear\"\n* Click \"BOTH\"\n* (~0.015 sec) (OK)\n\n---\n\nQuestion:\n\nWhy initial render time for component with both onBlur and onFocus is much bigger than others?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuchk4%2Fonblurexample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftuchk4%2Fonblurexample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuchk4%2Fonblurexample/lists"}