I get this error when I try and use my async action, how can use an async in my action?:
export async function bookmarkVideo(video) {
    const bookmarkedArray = (await AsyncStorage.getItem("bookmarked")) || [];
    if (bookmarkedArray === undefined || bookmarkedArray.length == 0) {
        bookmarkedArray.push(video);
        return dispatch => {
            dispatch(bookmarkSuccess(bookmarkedArray));
        };
    }
}
Container:
class VideoPlayerScreen extends React.Component {
  constructor(props) {
    super(props);
    this.state = {};
    this.bookmarkVideo = this.bookmarkVideo.bind(this);
  }
  bookmarkVideo() {
    const { bookmarkVideo, id } = this.props;
    bookmarkVideo(id);
  }
  render() {
    ...
    const newProps = { ...videoProps, url };
    return (
      <View style={styles.container}>
        <VideoPlayerHeader {...videoProps} onClick={this.bookmarkVideo} />
        ...
      </View>
    );
  }
}
const mapDispatchToProps = dispatch => ({
  bookmarkVideo: id => dispatch(bookmarkVideo(id))
});
const mapStateToProps = state => {
  return {
    videos: state.videos
  };
};
export default connect(
  mapStateToProps,
  mapDispatchToProps
)(VideoPlayerScreen);
Component:
export default class VideoPlayerHeader extends React.Component {
    constructor(props) {
        super(props);
        this.handleClick = this.handleClick.bind(this);
    }
    handleClick() {
        let { onClick, id } = this.props;
        onClick(id);
    }
    render() {
        let { title } = this.props;
        return (
            <View style={styles.navBar}>
            ...
                <View style={styles.rightContainer}>
                    <TouchableHighlight onPress={this.handleClick}>
                    ...
                    </TouchableHighlight>
                </View>
            </View>
        );
    }
}
Store:
import { createStore, applyMiddleware } from "redux";
import thunk from "redux-thunk";
import logger from "redux-logger";
import rootReducer from "../reducers";
const initialState = {
    videos: []
};
const store = createStore(
    rootReducer,
    initialState,
    applyMiddleware(thunk, logger)
);
export default store;
UPDATE:
I get video undefined in my action:
export function bookmarkVideo(video) {
   // video undefined
    return async function(dispatch) {
        const bookmarkedArray = (await AsyncStorage.getItem("bookmarked")) || [];
        if (bookmarkedArray === undefined || bookmarkedArray.length == 0) {
            bookmarkedArray.push(video);
            // undefined 
            console.log('array', bookmarkedArray)
            dispatch(bookmarkSuccess(bookmarkedArray));
        }
    }
}
 
     
    