Skip to content

Commit

Permalink
Merge pull request #155 from lorengreenfield/rerender-debounce
Browse files Browse the repository at this point in the history
Optimise rerender by debouncing
  • Loading branch information
lorengreenfield committed Nov 27, 2018
2 parents 60c1d0e + b5f2c79 commit 0dd0743
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion halfcab.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -409,9 +409,13 @@ export default (config, {shiftyRouter = shiftyRouterModule, href = hrefModule, h
})
}

function rerender () {
debounce(stateUpdated)
}

export {
getRouteComponent,
stateUpdated as rerender,
rerender,
formIsValid,
ssr,
injectHTML,
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "halfcab",
"version": "11.0.0",
"version": "11.0.1",
"description": "A simple universal JavaScript framework focused on making use of es2015 template strings to build components.",
"main": "halfcab.mjs",
"module": "halfcab.mjs",
Expand Down

0 comments on commit 0dd0743

Please sign in to comment.