help: issue with fetching
See original GitHub issue📚 What are you trying to do? Please describe. I run my vue 3.0 project successfully, but the page source didn’t show my data, and send me a error message; Code
setup() {
const route = useRoute();
const data = ref({});
const { id = "" } = route.value.params;
const fetchData = async () => {
let detail = await Api.detail(id);
detail.content = marked(detail.content);
data.value = detail;
};
const { fetch, fetchstate } = useFetch(async () => {
await fetchData();
});
fetch();
fetchstate;
return {
data,
};
},
Error
ERROR Error in fetch(): Cannot read property 'data' of undefined 18:17:54
at module.exports../utils/request.js.baseURL (server.js:5693:19)
at process._tickCallback (internal/process/next_tick.js:68:7)
(Sorry,My English is poor.)
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Troubleshooting & Support — Fetch Help - Fetch Softworks
If you cannot find the answer via the above methods, you can submit your problem or question using the Fetch Softworks feedback page....
Read more >Call of Duty Warzone: How to Fix Error Stuck On Fetching ...
COD Warzone users are stuck in the Fetching Online Profile message error and eventually got booted out, here are 11 ways that should...
Read more >How to Fix Error Fetching Data on Facebook - Technipages
If you're using the mobile app, update the app, and clear the cache. Did these troubleshooting suggestions help you fix the problem? Share...
Read more >Account Login Issues – Fetch
If this still does not help and you are still unable to log in, please reach out to our Customer Support Team so...
Read more >Fix "There was a problem fetching your zap data." error in ...
If you see a "there was a problem fetching your data" error, your destination app step: Might not have any data from 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
I found the question, It cause by axiox, It maybe used by other library, so I need to create a new instance;
const instance = axios.create()
My project run successfully, I will read the document carefully next time ! Thank you !@congyaqwq You shouldn’t need to manually trigger
fetch()
at all - it will be done byuseFetch
.