Closed FilipMessa closed 5 years ago
Storybook from packages/universal-components
Built with commit 403128b832793f8c96d5524dd6774ed643635f5b
https://deploy-preview-818--kiwicom-universal-components.netlify.com
Yes, they were added here (https://github.com/kiwicom/margarita/pull/658) because before the persistence of the search parameters was done on reload by getting them from the router query params and passing them as props to the context to repopulate it.
However, here (https://github.com/kiwicom/margarita/pull/695) was changed to set it from an action in the context (setStateFromQueryParams
) which is called on ComponentDidMount
on the components that use it (Results
and Search
). So the props are indeed useless now :)
I realized that we set the default state for the SearchContext from props, but I can't find any use case for that, and also props sending to SearchContext are different that flowTypes expected.
PLEASE double check if I didn't miss something.