diegoddox / react-redux-toastr

react-redux-toastr is a toastr message implemented with Redux
http://diegoddox.github.io/react-redux-toastr/
MIT License
752 stars 149 forks source link

GetState missing from ReduxToasterProps in TS #255

Closed MoJama1995 closed 3 years ago

MoJama1995 commented 4 years ago

Hi.

While following your tutorial on how to use React-Redux-Toaster, we noticed that adding in the TSX attribute getState was missing from your ReduxToastr props in the type definitions .

On line 131 in your typeDefinitions - export default class ReduxToastr extends Component<ReduxToastrProps> {}

and your ReduxToastrProps

interface ReduxToastrProps {
    confirmOptions?: {
        cancelText: string;
        okText: string;
    };
    newestOnTop?: boolean;
    options?: any; // This is currently not used, waiting for response from the package author to remove
    position?: positionType;
    preventDuplicates?: boolean;
    progressBar?: boolean;
    timeOut?: number;
    toastr?: ToastrState;
    transitionIn?: transitionInType;
    transitionOut?: transitionOutType;
    className?: string;
    closeOnToastrClick?: boolean;
}

When getting to step 4 of your tutorial, we're getting an error based on the fact that get state isn't on the component props - any potential fixes for this?

Thanks

diegoddox commented 4 years ago

Hi @MoJama1995 at the moment I'm not using typescript so this will not be possible. https://www.npmjs.com/package/@types/react-redux-toastr