Using TFS API in react app - Can I use TFS API in react app or can I load C# DLL's into react app?

210 Views Asked by At

I need to get the list of all the repositories and all the branches from TFS.

I have a react app and I wonder if there is some way to use TFS API from it. Or maybe I should load C# DLL's in order to do that?

Thanks :)

I found this: https://learn.microsoft.com/en-us/rest/api/azure/devops/git/repositories/list?view=azure-devops-rest-6.0&tabs=HTTP but it is for C#.

2

There are 2 best solutions below

0
Sapir Hender On BEST ANSWER

I decided to do an MVC ASP .NET app with controller and the react app inside the client because I already have code in C# that connect to the TFS and do some queries (TFS has a REST api for C# also). If it will help someone:
Use React with ASP.NET Core
How To Develop and Build React App With .NET Core Backend

3
Antonia Wu-MSFT On

From my knowledge, React uses Javascript. Here is the client library for different languages, include Node.js.

And here you could see the usable rest api for Node.js.

You could get Branches for Git repo and TFVC repo: enter image description here

Please see details here: Git repo api & TFVC repo api.