Skip to content

Commit

Permalink
Don't use react-redux Provider
Browse files Browse the repository at this point in the history
  • Loading branch information
moroshko committed Apr 21, 2016
1 parent bf29701 commit d4e12d9
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions src/AutosuggestContainer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { Component, PropTypes } from 'react';
import { createStore } from 'redux';
import { Provider } from 'react-redux';
import reducer from './reducerAndActions';
import Autosuggest from './Autosuggest';

Expand Down Expand Up @@ -120,22 +119,21 @@ export default class AutosuggestContainer extends Component {
} = this.props;

return (
<Provider store={this.store}>
<Autosuggest multiSection={multiSection}
shouldRenderSuggestions={shouldRenderSuggestions}
suggestions={suggestions}
onSuggestionsUpdateRequested={onSuggestionsUpdateRequested}
getSuggestionValue={getSuggestionValue}
renderSuggestion={renderSuggestion}
renderSectionTitle={renderSectionTitle}
getSectionSuggestions={getSectionSuggestions}
inputProps={inputProps}
onSuggestionSelected={onSuggestionSelected}
focusInputOnSuggestionClick={focusInputOnSuggestionClick}
theme={mapToAutowhateverTheme(theme)}
id={id}
inputRef={this.saveInput} />
</Provider>
<Autosuggest multiSection={multiSection}
shouldRenderSuggestions={shouldRenderSuggestions}
suggestions={suggestions}
onSuggestionsUpdateRequested={onSuggestionsUpdateRequested}
getSuggestionValue={getSuggestionValue}
renderSuggestion={renderSuggestion}
renderSectionTitle={renderSectionTitle}
getSectionSuggestions={getSectionSuggestions}
inputProps={inputProps}
onSuggestionSelected={onSuggestionSelected}
focusInputOnSuggestionClick={focusInputOnSuggestionClick}
theme={mapToAutowhateverTheme(theme)}
id={id}
inputRef={this.saveInput}
store={this.store} />
);
}
}

1 comment on commit d4e12d9

@markdalgleish
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love how simple this is! 👏

Please sign in to comment.