kentcdodds / react-workshop-app

An abstraction for all my React workshops
https://kentcdodds.com/workshops
MIT License
149 stars 37 forks source link

Multiple exercise files - space in filename #29

Closed Aprillion closed 4 years ago

Aprillion commented 4 years ago

I just copied an exercise file in the react-hooks workshop and I noticed that we forgot to test the new feature with a space in the filename :(

Reproduction steps:

Expected:

Actual:

Aprillion commented 4 years ago

I plan to investigate (and fix 🤞) this issue later today after work (or during weekend), but if someone figures it out sooner than that, feel free to go ahead and fix it ;)

kentcdodds commented 4 years ago

Three things @Aprillion,

  1. Thanks for reporting
  2. That's odd
  3. Creating new files in the workshops is not supported. Of course it's something you can do, but I really am confused why you'd want to. The objective of the workshop is to stay in the exercise files to learn the concepts and then when we build the app you'll get to expand horizons.

Could you help me understand the desire to add new files?

Aprillion commented 4 years ago

Could you help me understand the desire to add new files?

It's related to the PR#27 (and 28) for people who want to keep their extra credits solutions in separate files (as opposed to the recommended flow to edit only the one exercise file).

And more files can be created to compare different approaches to the same problem (e.g. 08 classes instead of hooks.js)...

If that sounds too much of an edge case, feel free to close this issue and I will focus my time on doing the next exercise instead of debugging something between wepback import() and React.lazy() 😂

  1. That's odd

My thoughts exactly! But no time to dive deeper during work hours :/

kentcdodds commented 4 years ago

I don't mind this getting fixed. I'm happy you've found a workflow you like. It's a shame that you have to restart the server to add new files.

Unfortunately I can't dedicate any time to fixing this myself. But feel free to fix it later if you have the time :)

Aprillion commented 4 years ago

Gotcha! classList methods don't like a space (and the stack trace is much nicer with npm run dev) => PR comming..