Connected creation form with redux, and created reducer for short URL creation

This commit is contained in:
Alejandro Celaya
2018-07-28 10:41:05 +02:00
parent c51bf5b9a0
commit 0a5c20e3ee
13 changed files with 116 additions and 48 deletions

View File

@@ -4,6 +4,7 @@ import React from 'react';
import { connect } from 'react-redux';
import { updateShortUrlsList } from './reducers/shortUrlsList';
import './SearchBar.scss';
import { pick } from 'ramda';
export class SearchBar extends React.Component {
state = {
@@ -52,6 +53,4 @@ export class SearchBar extends React.Component {
}
}
export default connect(state => (
{ shortUrlsListParams: state.shortUrlsListParams }
), { updateShortUrlsList })(SearchBar);
export default connect(pick(['shortUrlsListParams']), { updateShortUrlsList })(SearchBar);