rumkin / pill

Add dynamic content loading to static sites with only 1 KiB of JS
https://rumkin.github.io/pill/
MIT License
383 stars 19 forks source link

Create onMounting hook #6

Closed tamb closed 4 years ago

tamb commented 4 years ago

This hook fires before every content change. This way we can clean up any assets we may want to clean up before content changes.

rumkin commented 4 years ago

Just have reviewed the PR. Currently it has conflicts. Could you clean it up and remove anything not related to the changed behavior itself?

tamb commented 4 years ago

@rumkin Question: Should this be onMounting or onLoading? And the fetching of the page is onFetch?? What naming would you want? Currently it would be onMounting onLoading

But I feel it should be onMounting/onLoading and onFetch

rumkin commented 4 years ago

@tamb Let's implement only onMounting hook in this PR. I have some doubts about onFetch interface.