Code Monkey home page Code Monkey logo

react-trello-client's People

Contributors

irandoust avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

paulsp94

react-trello-client's Issues

Typings problems

Hello,

I'm using this project with TypeScript and the compiler aways complain about missing module definition.

I did a local solution by creating a index.d.ts in the dist folder of the dependency in the node_modules with the following content:

export const Trello: any;

const TrelloClient: any;

export default TrelloClient;

It's enough to fix the errors, but every time I install a new dependency I need to put this file in the dist folder again.

Do you have any solutions?

Thanks in advance.

How to make a Call to the Trello API with react-trello-client?

Hello,

I try to get this to work :D I do not have much experience with react and maybe i miss something.

Authorization works fine. But then i want to make requests to the Trello API.

in the regular client.js by trello i would do something like:
window.Trello.rest("GET", "members/me", (res) => console.log(res), err => console.log(err));

when i try this from my react component, i get an error.

can I do something like
import Trello from "react-trello-client"
to use the Trello Object in my component to not use window.Trello?

Maybe you can include a small example in the README?

Thanks!

How to use Trello object in another component

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 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,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.