React has introduced axios, into the entry file, but undefind is used when subcomponents are used.

TypeError: Cannot read property "get" of undefined

the axios printed out in the subcomponent is also undefind

clipboard.png

clipboard.png

clipboard.png

Mar.09,2021

your calls in subcomponents are made through this.axios , which means that your component must have the axios attribute.
can be a component similar to lib , referencing axios in it, and then subcomponent referencing lib before using it.


has been resolved, thank you

Menu