no-stack-dub-sack / cs-playground-react

In-Browser Algorithm and Data Structures Practice
http://cs-playground-react.surge.sh/
MIT License
520 stars 91 forks source link

Can't edit any seed or solution information #16

Closed oliverfencott closed 6 years ago

oliverfencott commented 6 years ago

Hello,

When I change any seed or solution information in the exported file (e.g. src/assets/seed/data-structures/LinkedList.js ), no changes are reflected in the UI. However, when I change the title string or resources array, the changes are made.

I've cleared my local storage, not really sure of what else to try (or why this might be happening), any ideas?

Thanks!

no-stack-dub-sack commented 6 years ago

@oliverfencott hmmm... yes, just another good reason for me to add a contributing doc (#18). There are some pitfalls to the local storage approach, and this is one of them apparently. With clear instructions on contributing, hopefully this won't be a problem for others in the future.

if you make changes, write resetState() in the editor and click the "Run Code" button (twice - the first time you will get a warning in the console), this will completely reset the app's state, and cause the editor reducer to pull code from the seed files rather from local storage (because it will delete the local storage key, so there will be none to pull from), and your changes should then be there.

Let me know if this works!

no-stack-dub-sack commented 6 years ago

@oliverfencott closing as stale - feel free to reopen if you still need help with this