{"id":16788745,"url":"https://github.com/markmead/alpinejs-force-next-tick","last_synced_at":"2025-07-14T17:31:53.830Z","repository":{"id":180925408,"uuid":"665920508","full_name":"markmead/alpinejs-force-next-tick","owner":"markmead","description":"Alpine JS implementation of the double `requestAnimationFrame` method to force `$nextTick`","archived":false,"fork":false,"pushed_at":"2024-04-04T11:04:09.000Z","size":14,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-14T08:24:38.372Z","etag":null,"topics":["alpine-js","alpinejs","alpinejs-plugin","nexttick"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markmead.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2023-07-13T09:44:31.000Z","updated_at":"2024-06-04T23:19:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"8be0bb4f-369a-4003-8e63-c19157039aca","html_url":"https://github.com/markmead/alpinejs-force-next-tick","commit_stats":null,"previous_names":["markmead/alpinejs-force-next-tick"],"tags_count":0,"template":false,"template_full_name":"markmead/alpinejs-plugin-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmead%2Falpinejs-force-next-tick","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmead%2Falpinejs-force-next-tick/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmead%2Falpinejs-force-next-tick/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmead%2Falpinejs-force-next-tick/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markmead","download_url":"https://codeload.github.com/markmead/alpinejs-force-next-tick/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225989896,"owners_count":17556057,"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":["alpine-js","alpinejs","alpinejs-plugin","nexttick"],"created_at":"2024-10-13T08:24:36.059Z","updated_at":"2024-11-23T01:34:57.404Z","avatar_url":"https://github.com/markmead.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Alpine JS Force `$nextTick`\n\nAlpine JS implementation of the double `requestAnimationFrame` method to force\n`$nextTick`\n\n---\n\nYou can find out more about the issue in Vue here -\nhttps://github.com/vuejs/vue/issues/9200\n\nVue JS version - https://github.com/twickstrom/vue-force-next-tick\n\n## Install\n\n### With a CDN\n\n```html\n\u003cscript\n  defer\n  src=\"https://unpkg.com/alpinejs-force-next-tick@latest/dist/force-next-tick.min.js\"\n\u003e\u003c/script\u003e\n\n\u003cscript defer src=\"https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js\"\u003e\u003c/script\u003e\n```\n\n### With a Package Manager\n\n```shell\nyarn add -D alpinejs-force-next-tick\n\nnpm install -D alpinejs-force-next-tick\n```\n\n```js\nimport Alpine from 'alpinejs'\nimport force-next-tick from 'alpinejs-force-next-tick'\n\nAlpine.plugin(force-next-tick)\n\nAlpine.start()\n```\n\n## Example\n\nIt works the same way as Alpine JS `$nextTick` but uses the double\n`requestAnimationFrame` method - https://alpinejs.dev/magics/nextTick\n\n```html\n\u003cbody x-data=\"{ firstName: 'John' }\"\u003e\n  \u003cbutton\n    @click=\"\n      firstName = 'Jane'\n      $forceNextTick(() =\u003e console.log($el.innerText))\n    \"\n    x-text=\"firstName\"\n  \u003e\n  \u003c/button\u003e\n\u003c/body\u003e\n```\n\nHere we are pausing an `async` function until after pending DOM updates. With\nthis approach an argument is not required.\n\n```html\n\u003cbody x-data=\"{ firstName: 'John' }\"\u003e\n  \u003cbutton\n    @click=\"\n      firstName = 'Jane'\n      await $forceNextTick()\n      console.log($el.innerText)\n    \"\n    x-text=\"firstName\"\n  \u003e\n  \u003c/button\u003e\n\u003c/body\u003e\n```\n\n## Stats\n\n![](https://img.shields.io/bundlephobia/min/alpinejs-force-next-tick)\n![](https://img.shields.io/npm/v/alpinejs-force-next-tick)\n![](https://img.shields.io/npm/dt/alpinejs-force-next-tick)\n![](https://img.shields.io/github/license/markmead/alpinejs-force-next-tick)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkmead%2Falpinejs-force-next-tick","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkmead%2Falpinejs-force-next-tick","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkmead%2Falpinejs-force-next-tick/lists"}