-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"fetcher is not a function" - React #212
Comments
Am I supposed to implement it on my side? |
No, it should be wired up out of the box and work fine. But that is the mechanism you seem to be having trouble with so I'm trying to point you to the right places to be troubleshooting the problem. |
I checked that my setup provides the same code as you pointed me to and it does |
It seems like the dataApi.js file is expecting me to provide a fetcher attribute inside the fetchOptions object described in the documentation page linked above, however it doesn't speaks about it |
Updating documentation to resolve issues mentioned in Sitecore#212 and Sitecore#253
Description
After having wired up my React JSS to my Sitecore instance, I tried fetching data from it like the documentation said but I encountered an error "TypeError: fetcher is not a function" within node_modules/@sitecore-jss/sitecore-jss/dist/dataApi.js:90.
Expected behavior
Feteching datas from my Sitecore instance.
Steps To Reproduce
Nothing more than a default HelloWorld React app made with
Then I added a basic React class component and added the very same lines (different token though) as the documentation within a componentDidMount function.
Your Environment
The text was updated successfully, but these errors were encountered: