@cerebral/http documentation is confusing
See original GitHub issueHello!
I’m new to cerebral and documentation for @cerebral/http
makes me so dejected.
According to doc, I can use it like this:
import {set} from 'cerebral/operators'
import {httpGet} from '@cerebral/http/operators'
import {state, props} from 'cerebral/tags'
export default [
httpGet(`/items/${props`itemKey`}`),
set(state`app.currentItem`, props`result`)
]
But if I do so, I’ll get the following error:
Uncaught TypeError: Cannot read property 'get' of undefined
at Object.httpGet [as function] (httpGet.js:17)
Which says nothing to me.
So there’re two problems:
- Unclear error message If use http operators without adding
HttpProvider
- Gap in documentation, since there’s no even word about I should instantiate it first in controller section.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
Cerebral FAQ | Care model, medication, cost, anxiety ...
We will support your mental wellness regardless of your insurance access. Does Cerebral provide letters of care, FMLA, and ESA documentation? Your Cerebral...
Read more >Http - Cerebral Docs
Http. Most applications needs some sort of requests going to a server. With Cerebral you choose your favourite library and expose it as...
Read more >Encephalopathy due to CVA - ACDIS Forums
Please bear with me, this topic is still very confusing to me with differing opinions. Since "encephalopathy" is defined as an acute condition ......
Read more >Diagnosis of brain death - UpToDate
Brain death implies the permanent absence of cerebral and ... Variable documentation of brain death criteria was also observed in a series ...
Read more >Clinical Documentation Guidance for ICD-10-CM/PCS - Retired
Queries should continue to be placed on the health record when unclear, ambiguous, or missing documentation is identified.
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 FreeTop 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
Top GitHub Comments
Thanks for reporting. It is a very important issues on my mind. We must check docs of all modules to avoid such confusion and put prerequisites at first place. Informative error messages when operators used without required providers is also must have for every package. Cc @christianalfoni @edgesoft @henri @reflog
Housekeeping!