Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analyse 'SearchBarUncontrolled' component. #225

Open
alejandromumo opened this issue Apr 21, 2022 · 0 comments
Open

Analyse 'SearchBarUncontrolled' component. #225

alejandromumo opened this issue Apr 21, 2022 · 0 comments

Comments

@alejandromumo
Copy link
Member

alejandromumo commented Apr 21, 2022

This issue is created to analyse whether SearchBar component can be fully uncontrolled. Right now, its state variable currentValue is initialised based on the prop queryString which is controlled by the component's parent (<SearchBarUncontrolled>).

queryString is a prop currently connected by Redux to the store's state state.query.queryString

The current implementation is updating the component's internal state rather than the redux one.

export const SearchBar = connect(
(state) => ({
queryString: state.query.queryString,
}),
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant