I created a view displaying all posts with a filter above them. Users can customize their view by selecting different options on the filter, resulting in updated posts being shown.
However, if a user clicks on a post after applying filters, the parent component displaying the posts will be destroyed. When the user tries to navigate back to the main posts page from the specific post page, the filters are not persisted as the parent component is recreated.
One potential solution to this issue is utilizing vuex to store the filter object when it is initially selected. This way, when the user navigates back to the posts page, the filters will still be applied. However, I have encountered challenges and time constraints using this method.
Does anyone have any alternative suggestions? Using keep-alive
is not an option for me since its usage seems limited to dynamic components only.