Conversation started Jun 19, 2020 at 10:09.
Jun 19, 2020 10:09
reading the error message is a thing many doesn't able to grasp on. Really.
I see people coming here "code broken. Not delivering what I want. *dumps error code*. pls halp and there is in the error code "cannot read property x of undefined". IS THAT NOT CLEAR???
Well but then in a few years it'll turn out the washing won't work at higher temperatures anymore. And you'll have to figure out why. Only after even more digging you notice that this was due to the change of teh default settings, something you completely forgot since it wasn't intuitive to change and what the settings meant.
and there is a property name + possible line
@KarelG "But I don't have a variable called undefined!" /s
This (pastie.org/p/3S9wXQXF3HiC0w8zBkEcDp) is my 50-line long code. That <Form /> component renders 4 input fields. If you type in the 1st field, the code is supposed to update the value of the property of the corresponding object in the state array. The array is imported from context and looks like:
const [yourQuestions, setYourQuestion] = useState([
        {
            id: 1,
            question: 'question',
            answer_a: 1,
            answer_b: 2,
            answer_c: 3,
            answer_d: 4,
            correct_answer: ''
        },
    ])
So, when I type in 1st input field i am getting this error: "Cannot read property 'map' of undefined"
@paul23 had a "small " problem with my manager because I *ahem* temporarily changed a setting because of some problems with a service but forgot to revert it ... for four months 😅
Jun 19, 2020 10:12
Any suggestions?
@user36339 This is a joke right?
...
I am bafled
 
Conversation ended Jun 19, 2020 at 10:13.