'after render' event
- Dominant language
- JavaScript
- Stars
- 6.8k
- Forks
- 573
- PR merge metrics
- No merged PRs in 30d
Description
I would really appreciate having an `after render` event fired (or something to that effect!) once the app is re-rendered after `render` is emitted. I frequently find myself wanting to bind events, scroll the new elements into view, or focus elements after nanomorph does it's thing.
The only solution I've found so far is to just setTimeout for 25ms, which feels _wayy_ too hacky for production.
Is it possible to use [choo-hooks](https://github.com/choojs/choo-hooks#hookonrender-cbtimings) to do this?
Contributor guide
Research direction
Start by tracing where the `render` event is emitted and where `nanomorph` completes the rerender. Review whether `choo-hooks` and its `hookOnRender` timing can provide the requested lifecycle point. Done means an `after render`-equivalent event reliably fires after the new elements are in place, with behavior validated by the project's relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100