Parameter of action is undefined when logged
See original GitHub issueWelcome to MobX. Please provide as much relevant information as possible!
I have a:
- Question: Feel free to just state your question. For a quick answer, there are usually people online at our Gitter channel
I have an input text component and I use a mobX action to update it’s value.
However, when I log the action parameter which is the new value of the the input text I get undefined
.
Here’s my action code:
updateStartingLettersText = action((changedText) => {
reactotron.logImportant('changed text is : ', changedText) //prints changed text is undefined
this.startingLettersText= changedText
})
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
react native - Why is the parameter inside the action coming ...
Right now, you're not passing the resultId , hence it is passed as undefined . const mapDispatchToProps = (dispatch) => { return { ......
Read more >A parameter to an Aura Action is undefined. But not always ...
I have a particularly strange issue where one, and only one parameter to an Aura Action is undefined. Worse, it seems to be...
Read more >Actions and reducers: updating state - Human Redux
In Redux all changes to the application state happen via an "action. ... we call it without arguments // it prints out 0...
Read more >Connect: Extracting Data with mapStateToProps - React Redux
As the first argument passed in to connect , mapStateToProps is used for ... pass null or undefined to connect in place of...
Read more >undefined - JavaScript - MDN Web Docs - Mozilla
undefined is a property of the global object. That is, it is a variable in global scope. In all non-legacy browsers, undefined is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
onChangeText={() => this.onStartingLettersTextChanged()}
=>onChangeText={this.onStartingLettersTextChanged}
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or questions.