[enhancement] turned the enter/leave middleware into hooks similar to the Vue natives like created, ready, etc