not start isValidated method (react refs new style)
See original GitHub issueI cannot start isValidated() method in my step
I found what stepMoveAllowed(skipValidationExecution = false)
method in StepZIlla cannot properly check this because this.refs is empty
else if (Object.keys(this.refs).length == 0 || typeof this.refs.activeComponent.isValidated == 'undefined') {
console.log(this.refs); // return EMPTY OBJECT
// if its a form component, it should have implemeted a public isValidated class (also pure componenets wont even have refs - i.e. a empty object). If not then continue
proceed = true;
}
my libraries
"react": "^15.3.2",
"react-addons-css-transition-group": "^15.5.2",
"react-bootstrap": "^0.30.10",
"react-dom": "^15.5.4",
"react-dropzone": "^3.13.0",
"react-hot-loader": "^3.0.0-beta.6",
"react-overlays": "^0.6.12",
"react-redux": "^5.0.4",
"react-router": "3.0.5",
"react-router-bootstrap": "^0.23.2",
"react-router-dom": "^4.1.1",
"react-router-redux": "^4.0.8",
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (2 by maintainers)
Top Results From Across the Web
Refs and the DOM - React
Refs provide a way to access DOM nodes or React elements created in the render method. In the typical React dataflow, props are...
Read more >How do I add validation to the form in my React component?
You should avoid using refs, you can do it with onChange function. On every change, update the state for the changed field.
Read more >A complete guide to React refs - LogRocket Blog
Learn how to use React refs, and why it's important to use them only when React can't handle a function call through its...
Read more >Useful Patterns by Use Case - React TypeScript Cheatsheets
Strategy: extend React.ComponentPropsWithoutRef<'button'>. // usage function App() { // Type '"foo"' is not assignable to type '"button" | "submit" ...
Read more >Controller | React Hook Form - Simple React forms validation
This simplifies integrating with external controlled components with non-standard prop names. Provides onChange , onBlur , name , ref and value to the...
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
Hey guys ,
Having the same issue.
MainComponent :
My step 5
And having this issue :
Issue seems to be here
My knowledge in React is very limited , so might be something I’m doing wrong ?
@jnordling @romanlex let me look into this further. I noticed that in @romanlex’s package.json, that your “react”: “^15.3.2” and “react-dom”: “^15.5.4” don’t match… I could be wrong but I believe it’s best practice that they match in version.
I do suspect this has something to do with your higher react-dom version, but let me investigate.