You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For starters, please forgive me if the answer to my question seems obvious, i'm a newcomer to react.
I read issue #4 and tinkered a lot with my project to try and make it work, but to no avail.
I have a component called Login which renders <TrelloClient /> and the authorization goes fine, and if I call Trello.rest("GET", "/members/me", res => console.log(res), err => console.log(err)) in authorizeOnSuccess it executes perfectly.
However, if in the authorizeOnSuccess function I decide to navigate to my other component (using reach-router), and in that component I try calling Trello.rest("GET", "/members/me", res => console.log(res), err => console.log(err)) in the componentDidMount method, I get this error :
react_trello_client__WEBPACK_IMPORTED_MODULE_2__.Trello.rest is not a function
I might be wrong on this one, but it seems to me that the Trello object resets once I navigate although I assumed it would be set globally.
Could you please point to me what I'm doing wrong ?
Thanks in advance,
The text was updated successfully, but these errors were encountered:
Hi,
For starters, please forgive me if the answer to my question seems obvious, i'm a newcomer to react.
I read issue #4 and tinkered a lot with my project to try and make it work, but to no avail.
I have a component called Login which renders
<TrelloClient />
and the authorization goes fine, and if I callTrello.rest("GET", "/members/me", res => console.log(res), err => console.log(err))
inauthorizeOnSuccess
it executes perfectly.However, if in the
authorizeOnSuccess
function I decide to navigate to my other component (using reach-router), and in that component I try callingTrello.rest("GET", "/members/me", res => console.log(res), err => console.log(err))
in thecomponentDidMount
method, I get this error :react_trello_client__WEBPACK_IMPORTED_MODULE_2__.Trello.rest is not a function
I might be wrong on this one, but it seems to me that the Trello object resets once I navigate although I assumed it would be set globally.
Could you please point to me what I'm doing wrong ?
Thanks in advance,
The text was updated successfully, but these errors were encountered: