Undefined value using redux
I'll post the code and make the question at the end.
SignUpScreen.js
export default class SignUpScreen extends Component {
constructor(props) {
super(props);
}
validateConfirmationPassword() {
const { username } = this.props;
console.log("TEST >> " + username);
}
render() {
const { username, password, email, confirmPassword } = this.props;
<Input
placeholder="Username"
value={username}
onChangeText= {(value) => this.props.onChangeText('username', value)}
/>
<Button
onPress={() => this.validateConfirmationPassword()}
/>
}
SignUpScreen_reducer.js
export default function reducer(state={
username: '',
email: '',
password: '',
confirmPassword: '',
usernameError: false,
emailError: false,
passwordError: false,
}, action) {
const { type, payload } = action
switch(type) {
case 'ON_CHANGE_UI_FIELD' : {
return {...state, [payload.key]: payload.value}
}
default: {
return state
}
}
SignUpScreenContainer.js
const mapStateToProps = (state) => {
return {
...state,
}
}
const mapDispatchToProps = (dispatch) => {
return {
onChangeText: (key, value) => {
dispatch(onChangeField(key, value))
},
}
}
export default connect(mapStateToProps, mapDispatchToProps)(SignUpScreen);
SignUpScreen_actions.js
export function onChangeField(key, value) {
return (dispatch) => {
dispatch({type: 'ON_CHANGE_UI_FIELD', payload: {key, value}})
}
}
PS: I removed part of the code that was unecessary (like buttons and input texts). If more code is needed, please let me know.
My question is: What am I doing wrong? I keep getting 'undefined' on my console.log("TEST") for username, password, email and everything else. I have my store set up correctly. Also I can see the values being received on the actions and on the reducer, with the correct 'key' and 'value'.
Any help would be appreciated. Thanks in advance.
javascript react-native redux
|
show 1 more comment
I'll post the code and make the question at the end.
SignUpScreen.js
export default class SignUpScreen extends Component {
constructor(props) {
super(props);
}
validateConfirmationPassword() {
const { username } = this.props;
console.log("TEST >> " + username);
}
render() {
const { username, password, email, confirmPassword } = this.props;
<Input
placeholder="Username"
value={username}
onChangeText= {(value) => this.props.onChangeText('username', value)}
/>
<Button
onPress={() => this.validateConfirmationPassword()}
/>
}
SignUpScreen_reducer.js
export default function reducer(state={
username: '',
email: '',
password: '',
confirmPassword: '',
usernameError: false,
emailError: false,
passwordError: false,
}, action) {
const { type, payload } = action
switch(type) {
case 'ON_CHANGE_UI_FIELD' : {
return {...state, [payload.key]: payload.value}
}
default: {
return state
}
}
SignUpScreenContainer.js
const mapStateToProps = (state) => {
return {
...state,
}
}
const mapDispatchToProps = (dispatch) => {
return {
onChangeText: (key, value) => {
dispatch(onChangeField(key, value))
},
}
}
export default connect(mapStateToProps, mapDispatchToProps)(SignUpScreen);
SignUpScreen_actions.js
export function onChangeField(key, value) {
return (dispatch) => {
dispatch({type: 'ON_CHANGE_UI_FIELD', payload: {key, value}})
}
}
PS: I removed part of the code that was unecessary (like buttons and input texts). If more code is needed, please let me know.
My question is: What am I doing wrong? I keep getting 'undefined' on my console.log("TEST") for username, password, email and everything else. I have my store set up correctly. Also I can see the values being received on the actions and on the reducer, with the correct 'key' and 'value'.
Any help would be appreciated. Thanks in advance.
javascript react-native redux
Why aren't SignUpScreenContainer.js and SignUpScreen.js in the same file?
– Yossi
Nov 13 '18 at 17:32
inside ofmapStateToProps()
can you please doconsole.log(state)
and share the structure of the result?
– Alexander Staroselsky
Nov 13 '18 at 17:32
i think the problem is with 'this', as it is losing scope inside function "validateConfirmationPassword", can you console log this.props ?
– Muhammad Sadiq
Nov 13 '18 at 17:36
1
YourvalidateConfirmationPassword
is unbound; eitherbind
in the ctor or use an arrow function.
– Dave Newton
Nov 13 '18 at 17:37
@DaveNewton did that, still the same error
– kivul
Nov 13 '18 at 20:43
|
show 1 more comment
I'll post the code and make the question at the end.
SignUpScreen.js
export default class SignUpScreen extends Component {
constructor(props) {
super(props);
}
validateConfirmationPassword() {
const { username } = this.props;
console.log("TEST >> " + username);
}
render() {
const { username, password, email, confirmPassword } = this.props;
<Input
placeholder="Username"
value={username}
onChangeText= {(value) => this.props.onChangeText('username', value)}
/>
<Button
onPress={() => this.validateConfirmationPassword()}
/>
}
SignUpScreen_reducer.js
export default function reducer(state={
username: '',
email: '',
password: '',
confirmPassword: '',
usernameError: false,
emailError: false,
passwordError: false,
}, action) {
const { type, payload } = action
switch(type) {
case 'ON_CHANGE_UI_FIELD' : {
return {...state, [payload.key]: payload.value}
}
default: {
return state
}
}
SignUpScreenContainer.js
const mapStateToProps = (state) => {
return {
...state,
}
}
const mapDispatchToProps = (dispatch) => {
return {
onChangeText: (key, value) => {
dispatch(onChangeField(key, value))
},
}
}
export default connect(mapStateToProps, mapDispatchToProps)(SignUpScreen);
SignUpScreen_actions.js
export function onChangeField(key, value) {
return (dispatch) => {
dispatch({type: 'ON_CHANGE_UI_FIELD', payload: {key, value}})
}
}
PS: I removed part of the code that was unecessary (like buttons and input texts). If more code is needed, please let me know.
My question is: What am I doing wrong? I keep getting 'undefined' on my console.log("TEST") for username, password, email and everything else. I have my store set up correctly. Also I can see the values being received on the actions and on the reducer, with the correct 'key' and 'value'.
Any help would be appreciated. Thanks in advance.
javascript react-native redux
I'll post the code and make the question at the end.
SignUpScreen.js
export default class SignUpScreen extends Component {
constructor(props) {
super(props);
}
validateConfirmationPassword() {
const { username } = this.props;
console.log("TEST >> " + username);
}
render() {
const { username, password, email, confirmPassword } = this.props;
<Input
placeholder="Username"
value={username}
onChangeText= {(value) => this.props.onChangeText('username', value)}
/>
<Button
onPress={() => this.validateConfirmationPassword()}
/>
}
SignUpScreen_reducer.js
export default function reducer(state={
username: '',
email: '',
password: '',
confirmPassword: '',
usernameError: false,
emailError: false,
passwordError: false,
}, action) {
const { type, payload } = action
switch(type) {
case 'ON_CHANGE_UI_FIELD' : {
return {...state, [payload.key]: payload.value}
}
default: {
return state
}
}
SignUpScreenContainer.js
const mapStateToProps = (state) => {
return {
...state,
}
}
const mapDispatchToProps = (dispatch) => {
return {
onChangeText: (key, value) => {
dispatch(onChangeField(key, value))
},
}
}
export default connect(mapStateToProps, mapDispatchToProps)(SignUpScreen);
SignUpScreen_actions.js
export function onChangeField(key, value) {
return (dispatch) => {
dispatch({type: 'ON_CHANGE_UI_FIELD', payload: {key, value}})
}
}
PS: I removed part of the code that was unecessary (like buttons and input texts). If more code is needed, please let me know.
My question is: What am I doing wrong? I keep getting 'undefined' on my console.log("TEST") for username, password, email and everything else. I have my store set up correctly. Also I can see the values being received on the actions and on the reducer, with the correct 'key' and 'value'.
Any help would be appreciated. Thanks in advance.
javascript react-native redux
javascript react-native redux
edited Nov 13 '18 at 18:44
kivul
asked Nov 13 '18 at 17:29
kivulkivul
458112
458112
Why aren't SignUpScreenContainer.js and SignUpScreen.js in the same file?
– Yossi
Nov 13 '18 at 17:32
inside ofmapStateToProps()
can you please doconsole.log(state)
and share the structure of the result?
– Alexander Staroselsky
Nov 13 '18 at 17:32
i think the problem is with 'this', as it is losing scope inside function "validateConfirmationPassword", can you console log this.props ?
– Muhammad Sadiq
Nov 13 '18 at 17:36
1
YourvalidateConfirmationPassword
is unbound; eitherbind
in the ctor or use an arrow function.
– Dave Newton
Nov 13 '18 at 17:37
@DaveNewton did that, still the same error
– kivul
Nov 13 '18 at 20:43
|
show 1 more comment
Why aren't SignUpScreenContainer.js and SignUpScreen.js in the same file?
– Yossi
Nov 13 '18 at 17:32
inside ofmapStateToProps()
can you please doconsole.log(state)
and share the structure of the result?
– Alexander Staroselsky
Nov 13 '18 at 17:32
i think the problem is with 'this', as it is losing scope inside function "validateConfirmationPassword", can you console log this.props ?
– Muhammad Sadiq
Nov 13 '18 at 17:36
1
YourvalidateConfirmationPassword
is unbound; eitherbind
in the ctor or use an arrow function.
– Dave Newton
Nov 13 '18 at 17:37
@DaveNewton did that, still the same error
– kivul
Nov 13 '18 at 20:43
Why aren't SignUpScreenContainer.js and SignUpScreen.js in the same file?
– Yossi
Nov 13 '18 at 17:32
Why aren't SignUpScreenContainer.js and SignUpScreen.js in the same file?
– Yossi
Nov 13 '18 at 17:32
inside of
mapStateToProps()
can you please do console.log(state)
and share the structure of the result?– Alexander Staroselsky
Nov 13 '18 at 17:32
inside of
mapStateToProps()
can you please do console.log(state)
and share the structure of the result?– Alexander Staroselsky
Nov 13 '18 at 17:32
i think the problem is with 'this', as it is losing scope inside function "validateConfirmationPassword", can you console log this.props ?
– Muhammad Sadiq
Nov 13 '18 at 17:36
i think the problem is with 'this', as it is losing scope inside function "validateConfirmationPassword", can you console log this.props ?
– Muhammad Sadiq
Nov 13 '18 at 17:36
1
1
Your
validateConfirmationPassword
is unbound; either bind
in the ctor or use an arrow function.– Dave Newton
Nov 13 '18 at 17:37
Your
validateConfirmationPassword
is unbound; either bind
in the ctor or use an arrow function.– Dave Newton
Nov 13 '18 at 17:37
@DaveNewton did that, still the same error
– kivul
Nov 13 '18 at 20:43
@DaveNewton did that, still the same error
– kivul
Nov 13 '18 at 20:43
|
show 1 more comment
2 Answers
2
active
oldest
votes
You would need to do two things to resolve this issue. First as other have mentioned you need to bind validateConfirmationPassword()
in the constructor to ensure the function has the proper context when being called by onPress
:
constructor(props) {
super(props);
this.validateConfirmationPassword = this.validateConfirmationPassword.bind(this);
}
Second you would need to adjust how you area attempting to access username
. You indicated that when you are logging state
inside mapStateToProps()
, you are seeing an object such as { "signUpScreenReducer": { "email": "", "emailError": false, "password": "", "passwordError": false, "username": "", "usernameError": false, }
. You are trying to access username
it as const { username } = this.props;
, but everything is nested within property signUpScreenReducer
. You would need to access it like:
const { username } = this.props.signUpScreenReducer;
Or you could change your mapStateToProps()
to Object spread the actual properties of the signUpScreenReducer
(state.signUpScreenReducer) object:
const mapStateToProps = ({ signUpScreenReducer }) => {
return {
...signUpScreenReducer,
}
}
You don't even need spread, you could just also:
const mapStateToProps = ({ signUpScreenReducer }) => signUpScreenReducer;
Hopefully that helps!
oh man, thank you so much, that worked!
– kivul
Nov 13 '18 at 21:24
add a comment |
-Just Replace your validateConfirmationPassword function with below version.
validateConfirmationPassword = () => {
const { username } = this.props;
console.log("TEST >> " + username);
}
OR do binding for that function in constructor as below
constructor(props) {
super(props);
this.validateConfirmationPassword = this.validateConfirmationPassword.bind(this);
}
@MuhammadSadiq did both of them and neither worked. I added the log on the mapStateToProps like you asked and got this: Object { "signUpScreenReducer": Object { "email": "", "emailError": false, "password": "", "passwordError": false, "username": "", "usernameError": false, },
– kivul
Nov 13 '18 at 18:39
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53286542%2fundefined-value-using-redux%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You would need to do two things to resolve this issue. First as other have mentioned you need to bind validateConfirmationPassword()
in the constructor to ensure the function has the proper context when being called by onPress
:
constructor(props) {
super(props);
this.validateConfirmationPassword = this.validateConfirmationPassword.bind(this);
}
Second you would need to adjust how you area attempting to access username
. You indicated that when you are logging state
inside mapStateToProps()
, you are seeing an object such as { "signUpScreenReducer": { "email": "", "emailError": false, "password": "", "passwordError": false, "username": "", "usernameError": false, }
. You are trying to access username
it as const { username } = this.props;
, but everything is nested within property signUpScreenReducer
. You would need to access it like:
const { username } = this.props.signUpScreenReducer;
Or you could change your mapStateToProps()
to Object spread the actual properties of the signUpScreenReducer
(state.signUpScreenReducer) object:
const mapStateToProps = ({ signUpScreenReducer }) => {
return {
...signUpScreenReducer,
}
}
You don't even need spread, you could just also:
const mapStateToProps = ({ signUpScreenReducer }) => signUpScreenReducer;
Hopefully that helps!
oh man, thank you so much, that worked!
– kivul
Nov 13 '18 at 21:24
add a comment |
You would need to do two things to resolve this issue. First as other have mentioned you need to bind validateConfirmationPassword()
in the constructor to ensure the function has the proper context when being called by onPress
:
constructor(props) {
super(props);
this.validateConfirmationPassword = this.validateConfirmationPassword.bind(this);
}
Second you would need to adjust how you area attempting to access username
. You indicated that when you are logging state
inside mapStateToProps()
, you are seeing an object such as { "signUpScreenReducer": { "email": "", "emailError": false, "password": "", "passwordError": false, "username": "", "usernameError": false, }
. You are trying to access username
it as const { username } = this.props;
, but everything is nested within property signUpScreenReducer
. You would need to access it like:
const { username } = this.props.signUpScreenReducer;
Or you could change your mapStateToProps()
to Object spread the actual properties of the signUpScreenReducer
(state.signUpScreenReducer) object:
const mapStateToProps = ({ signUpScreenReducer }) => {
return {
...signUpScreenReducer,
}
}
You don't even need spread, you could just also:
const mapStateToProps = ({ signUpScreenReducer }) => signUpScreenReducer;
Hopefully that helps!
oh man, thank you so much, that worked!
– kivul
Nov 13 '18 at 21:24
add a comment |
You would need to do two things to resolve this issue. First as other have mentioned you need to bind validateConfirmationPassword()
in the constructor to ensure the function has the proper context when being called by onPress
:
constructor(props) {
super(props);
this.validateConfirmationPassword = this.validateConfirmationPassword.bind(this);
}
Second you would need to adjust how you area attempting to access username
. You indicated that when you are logging state
inside mapStateToProps()
, you are seeing an object such as { "signUpScreenReducer": { "email": "", "emailError": false, "password": "", "passwordError": false, "username": "", "usernameError": false, }
. You are trying to access username
it as const { username } = this.props;
, but everything is nested within property signUpScreenReducer
. You would need to access it like:
const { username } = this.props.signUpScreenReducer;
Or you could change your mapStateToProps()
to Object spread the actual properties of the signUpScreenReducer
(state.signUpScreenReducer) object:
const mapStateToProps = ({ signUpScreenReducer }) => {
return {
...signUpScreenReducer,
}
}
You don't even need spread, you could just also:
const mapStateToProps = ({ signUpScreenReducer }) => signUpScreenReducer;
Hopefully that helps!
You would need to do two things to resolve this issue. First as other have mentioned you need to bind validateConfirmationPassword()
in the constructor to ensure the function has the proper context when being called by onPress
:
constructor(props) {
super(props);
this.validateConfirmationPassword = this.validateConfirmationPassword.bind(this);
}
Second you would need to adjust how you area attempting to access username
. You indicated that when you are logging state
inside mapStateToProps()
, you are seeing an object such as { "signUpScreenReducer": { "email": "", "emailError": false, "password": "", "passwordError": false, "username": "", "usernameError": false, }
. You are trying to access username
it as const { username } = this.props;
, but everything is nested within property signUpScreenReducer
. You would need to access it like:
const { username } = this.props.signUpScreenReducer;
Or you could change your mapStateToProps()
to Object spread the actual properties of the signUpScreenReducer
(state.signUpScreenReducer) object:
const mapStateToProps = ({ signUpScreenReducer }) => {
return {
...signUpScreenReducer,
}
}
You don't even need spread, you could just also:
const mapStateToProps = ({ signUpScreenReducer }) => signUpScreenReducer;
Hopefully that helps!
answered Nov 13 '18 at 21:19
Alexander StaroselskyAlexander Staroselsky
12.1k41940
12.1k41940
oh man, thank you so much, that worked!
– kivul
Nov 13 '18 at 21:24
add a comment |
oh man, thank you so much, that worked!
– kivul
Nov 13 '18 at 21:24
oh man, thank you so much, that worked!
– kivul
Nov 13 '18 at 21:24
oh man, thank you so much, that worked!
– kivul
Nov 13 '18 at 21:24
add a comment |
-Just Replace your validateConfirmationPassword function with below version.
validateConfirmationPassword = () => {
const { username } = this.props;
console.log("TEST >> " + username);
}
OR do binding for that function in constructor as below
constructor(props) {
super(props);
this.validateConfirmationPassword = this.validateConfirmationPassword.bind(this);
}
@MuhammadSadiq did both of them and neither worked. I added the log on the mapStateToProps like you asked and got this: Object { "signUpScreenReducer": Object { "email": "", "emailError": false, "password": "", "passwordError": false, "username": "", "usernameError": false, },
– kivul
Nov 13 '18 at 18:39
add a comment |
-Just Replace your validateConfirmationPassword function with below version.
validateConfirmationPassword = () => {
const { username } = this.props;
console.log("TEST >> " + username);
}
OR do binding for that function in constructor as below
constructor(props) {
super(props);
this.validateConfirmationPassword = this.validateConfirmationPassword.bind(this);
}
@MuhammadSadiq did both of them and neither worked. I added the log on the mapStateToProps like you asked and got this: Object { "signUpScreenReducer": Object { "email": "", "emailError": false, "password": "", "passwordError": false, "username": "", "usernameError": false, },
– kivul
Nov 13 '18 at 18:39
add a comment |
-Just Replace your validateConfirmationPassword function with below version.
validateConfirmationPassword = () => {
const { username } = this.props;
console.log("TEST >> " + username);
}
OR do binding for that function in constructor as below
constructor(props) {
super(props);
this.validateConfirmationPassword = this.validateConfirmationPassword.bind(this);
}
-Just Replace your validateConfirmationPassword function with below version.
validateConfirmationPassword = () => {
const { username } = this.props;
console.log("TEST >> " + username);
}
OR do binding for that function in constructor as below
constructor(props) {
super(props);
this.validateConfirmationPassword = this.validateConfirmationPassword.bind(this);
}
edited Nov 13 '18 at 21:58
Dave Newton
139k18209254
139k18209254
answered Nov 13 '18 at 17:42
Muhammad SadiqMuhammad Sadiq
972109
972109
@MuhammadSadiq did both of them and neither worked. I added the log on the mapStateToProps like you asked and got this: Object { "signUpScreenReducer": Object { "email": "", "emailError": false, "password": "", "passwordError": false, "username": "", "usernameError": false, },
– kivul
Nov 13 '18 at 18:39
add a comment |
@MuhammadSadiq did both of them and neither worked. I added the log on the mapStateToProps like you asked and got this: Object { "signUpScreenReducer": Object { "email": "", "emailError": false, "password": "", "passwordError": false, "username": "", "usernameError": false, },
– kivul
Nov 13 '18 at 18:39
@MuhammadSadiq did both of them and neither worked. I added the log on the mapStateToProps like you asked and got this: Object { "signUpScreenReducer": Object { "email": "", "emailError": false, "password": "", "passwordError": false, "username": "", "usernameError": false, },
– kivul
Nov 13 '18 at 18:39
@MuhammadSadiq did both of them and neither worked. I added the log on the mapStateToProps like you asked and got this: Object { "signUpScreenReducer": Object { "email": "", "emailError": false, "password": "", "passwordError": false, "username": "", "usernameError": false, },
– kivul
Nov 13 '18 at 18:39
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53286542%2fundefined-value-using-redux%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Why aren't SignUpScreenContainer.js and SignUpScreen.js in the same file?
– Yossi
Nov 13 '18 at 17:32
inside of
mapStateToProps()
can you please doconsole.log(state)
and share the structure of the result?– Alexander Staroselsky
Nov 13 '18 at 17:32
i think the problem is with 'this', as it is losing scope inside function "validateConfirmationPassword", can you console log this.props ?
– Muhammad Sadiq
Nov 13 '18 at 17:36
1
Your
validateConfirmationPassword
is unbound; eitherbind
in the ctor or use an arrow function.– Dave Newton
Nov 13 '18 at 17:37
@DaveNewton did that, still the same error
– kivul
Nov 13 '18 at 20:43