Closed matpeder closed 6 years ago
Cool - sounds good. I had it this way at first but moved to created
to ensure everything had mounted before performing any actions. I think it should be fine this way, though - and the fact that it now can support ssr environments is a nice plus. Thanks for the pr!
The current implementation initializes the component on the
created
hook. I experienced initialization failed server-side in a non-browser environment (possibly because of lack of cookies etc.).By deferring the initialization to the
mounted
hook (which never runs server-side) we can easily make sure no such issues happen.This is a small change, which I hope makes sense.