iamhosseindhv / notistack

Highly customizable notification snackbars (toasts) that can be stacked on top of each other
https://notistack.com
Other
3.93k stars 298 forks source link

Redux example doesn't run #150

Closed brownieboy closed 5 years ago

brownieboy commented 5 years ago

Expected Behavior

Example file should build and run when issuing a `yarn start`.

Current Behavior

`yarn start` fails with error "could not find a required file, index.js... searched examples\redux-example\src

Steps to Reproduce

No codesandbox example. You can reproduce by cloning the Git hub repository, cd into the redux-example folder and issue a yarn start command.

Link:

1. 2. 3. 4.

Context

Start the Redux example

Your Environment

Windows 7 with Git Bash shell Tech Version
Notistack v0.8.9
React 16.8.6
Browser n/a
etc. n/a

Problem is that react-scripts looks for index.js in a /src sub-folder and there isn't one in the example code. There doesn't seem to be any way of overriding where react-scripts looks for the start script either.

As a workaround, I created a /src folder and moved the example code into there. Then yarn start worked.

iamhosseindhv commented 5 years ago

Please download the example from codesandbox website: https://codesandbox.io/s/github/iamhosseindhv/notistack/tree/master/examples/redux-example

Screenshot 2019-08-10 at 19 58 37
brownieboy commented 5 years ago

Thanks, @iamhosseindhv .

Yes, I had already reworked the example code to add a /src folder, which is how it is in the Codepen example I see.

Is somebody going to change the example in the repository to match what's in Codepen so that it works? I'm happy to submit a PR for this, but it would really just be repackaging somebody else's work.