React developement?

Are there any examples, tutorials, even simple code snippets that layout how to use React with the Freskdesk API?

5 Likes

There are no official repos. We have internally developed apps for Freshdesk with React. The setup is quite similiar to one comparable with create-react-app

3 Likes

Hi @dgauderman
Welcome to the Freshworks developer community. A sample app using react CDN for Freshworks products is in works and will be ready in a day or two and I’ll share you the repo link as soon as it’s done.

@juliankleine Thanks for your support towards the forum. We’re glad that you could find some time to help fellow developers.

5 Likes

I am eagerly waiting to see a sample app. Our company is looking to use Freshdesk and this is high on our list as we want to implement a few new features for business.

2 Likes

Hi Vel, also very excited to see a freshdesk app template for react! Keep us posted!

2 Likes

Hey Drew,
Hope you are doing well! here is a simple sample app that uses react CDN,

Like I mentioned above this is a really basic app that will help you get started with react in Freshworks apps, if you have any suggestions or if you’d like to add new featured to the app, please feel free to raise an issue or create a PR to our marketplace sample app repository

I hope these example helps you in understanding our platform better! should you need anything else please feel free let us know :slight_smile:

1 Like

Hey Julian,

We just posted a sample app with react CDN. I believe your expectation is much advanced like a boilerplate which supports or similar to react CLI. though it is not in our current roadmap, we’d be happy to work with you on a solution for that problem!

Hope you have a great day :slight_smile:

1 Like

While I appreciate you guys taking the time to come up with the React example, I feel like its a poor example since it uses a babel to compile the files in the browser. That aside, your example does not FDK Validate or Pack, since it doesn’t recognize JSX syntax. So, how can we pack this into a Custom App that we can use?

I also took your example a step further. I built a proper FreshDesk React app using webpack to compile all the sourecode. I have been working on this since my original post date, and now its getting close to being done. But it seems the FDK Validate and Pack is now complaining about “Too many nested callbacks”, “Arrow function complexity”, “Method complexity” and more. I have built a rather complex advanced Time Log feature that uses FreshDesk Data Storage API and WHMCS API’s to Log Times entries and do proper invoicing based on those time logs. I could case less of what the FDK reports, I know my code is clean and to the point.

So again, how can we pack this into a Custom App that we can use?

1 Like

@dgauderman

We are glad that you took our example a step further, the app was built with relatively new developers in mind, who are new to javaScript and Freshworks platform and not to overwhelm them. experienced developers are always welcome to make our apps better and share it with the community

you are right about FDK not detecting JSX syntax, but the app can still be built using fdk pack --skip-validation lint command, which will skip all lint related validations, other non-lint related warnings need to be fixed before packing!

2 Likes

Do you have customized the webpack? It’s possible to use a create react app to upload to the marketplace?

Thanks for the feedback @dgauderman.

The validation in the FDK mainly caters to vanilla JS, and the FDK currently does not appreciate web pack tools that may be used around itself. We do wish to build more maturity into our tooling so they can work with popular web pack tools while meeting the goals of our lint validations. Before we finalize the solution therein, we will seek feedback from our community. We do hope you guys will all share your inputs.

1 Like