You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 25, 2019. It is now read-only.
Describe the bug
The challenge throws browser console errors if you manually define an explicit new state. It works if you just pass return {login: true};. It can be confusing to the user, since there was no mention of such restrictions, nor is the real error visible without opening the browser console ... which then looks like a pipeline issue. And for complexer states, typing out the whole structure just to change one property is an antipattern.
So, the problem is that the editor's Babel preset is es2015 and the syntax to spread objects is a language feature from es2018. I'll take a look and see if that can be updated.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
The challenge throws browser console errors if you manually define an explicit new state. It works if you just pass
return {login: true};
. It can be confusing to the user, since there was no mention of such restrictions, nor is the real error visible without opening the browser console ... which then looks like a pipeline issue. And for complexer states, typing out the whole structure just to change one property is an antipattern.To Reproduce
https://learn.freecodecamp.org/front-end-libraries/redux/handle-an-action-in-the-store
Expected behavior
I think it's enough to add another line to the challenge text telling the users to just return a new anonymous state object.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: