I'm new to React and have been thrown in the deep end with a task.
I must adjust the data for a date props. This looks (as far as I can tell) like:
form.defaultProps = {
conf: {},
minDate: new Date(),
maxDate: new Date(new Date().setFullYear(new Date().getFullYear() + 2)),
};
I want to test if maxDate
is the prop I am after. To do that I want to console.log
(or equivalent) its output.
Would anyone know how I should be doing this?
You should be able to just log it directly:
console.log(form.defaultProps);
Most likely, you might want to this within the form
component you are creating by calling console.log(this.props)
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With