-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Got TypeError: Object(...) is not a function when trying to import { selectorFamily } from "recoil" #105
Comments
Note that we want to keep the core API simple. So, optional helpers built on top of the core API are being exported in a RecoilUtils module. |
@drarmstr thank you. Since, for now, the code is not exported nicely with the build, does it make sense to put that information at |
@jimmyandrade The code is available here, it's just not being exported nicely with the build. Thanks for bearing with us as we're getting the initial release of this beta library up and going. |
Thank you for the support. And, sorry, I didn't express myself well in the last comment. I've found the helper function code: Recoil/src/recoil_values/Recoil_selectorFamily.js Lines 88 to 135 in 1e6e077
|
Hey @jimmyandrade, sorry about that mis-match. We are pretty new at this. Anyway, selectorFamily is (for now) just a simple memoized function, although we will probably add some other tricks for memory management soonish. Hope that unblocked you for now? |
Hey @davidmccabe! Don't worry, the work you people are doing is already helping a lot. In fact, I still haven't been able to unlock what I need. I'm talking about it here: #178 |
@jimmyandrade Hey bro, do you already resolved this? |
Is this the same issue for using atomFamily? |
@timeswind - Yes, same issue for @Cadrach - Can you fork the repository instead of using the NPM package as a workaround for now? We're getting close, though.. |
Developer Story
As a developer
I want to use the
selectorFamily
helper functionSo that I can make asynchronous queries with parameters
Description
I am trying to make an asynchronous data query with parameters. So I am trying to use the
selectorFamily
helper. But when I try toimport { selectorFamily } from "recoil"
, the application throwsTypeError: Object(...) is not a function
.How to fix it
Maybe exporting the
selectorFamily
helper at therecoil
library.Steps to reproduce the behavior
npm install recoil --save-exact
to install version0.0.7
;import { selectorFamily } from "recoil"
in this file;npm start
and check if error occurs.Expected behavior
Application should not throw a TypeError.
Actual behavior
Environment
Related code
Recoil/src/recoil_values/Recoil_selectorFamily.js
Lines 88 to 135 in 1e6e077
The text was updated successfully, but these errors were encountered: