registrationResult 'status' undefined

I am trying to create a custom registration form.
I have follwed the steps written in the documentation -

and I dont understand why the form doesnt work, what is missing?

picture of the error that pops when I try to run the code:

the forms UI:

the code:

Thanks in advance!