How to use Azure DevOps for building React Applications? - reactjs

Can we use Build Tools like "WebPack" or "SnowPack" within Azure DevOps for building React Applications?

When you create the build pipeline for your React App, we have provided the template (Node.js with React) for use.
In this template, it has contained the basic tasks to build the React App. You can add other tasks or delete the existing tasks as needed.
For more details, you also can reference this document.

Related

How to setup Adobe Analytics in webapp react typescript using Experience Platform Launch

How to setup Adobe Analytics in web app react typescript using Experience Platform Launch?
I have just js scripts like this:
<SCRIPT src="//assets.adobedtm.com/<hash>-staging.js"></SCRIPT>
and
<script type="text/javascript">_satellite.pageBottom();</script>
So, the question is how I can implement page tracking using those two scripts?
I want to create a component to track page switching when users walkthrough
Go to Launch, go into the property that you want to release. Then Go to the Environments:
It will give you the script to deploy:
Once you've deployed and tested the deployments, you can make a rule in Launch. In the rule, you set up triggers, conditions and actions. This explains it well.

Use React in views or use separate React app with ASP.NET Core 6.0 MVC app?

I am starting a new project which is a hiring portal so it'll involve minimal business logic and more of forms, data storage and external services.
Considering the fact that I haven't done much with React other than creating a simple hello world app using create-react-app from npm, I was wondering if it would be better to have a separate frontend app that gets all the backend work done through APIs in my .net app, or to simply use React in my views with the necessary jsx files and NuGet packages.

How to implement ReactJS with AdonisJS using create-react-app?

i made a simple CRUD system using AdonisJS (with the help of the views "Edge template system") and MySql for the back-end and i want to use ReactJS for the front-end but i don't know how to implement create-react-app so i can call the pages i created on the server to react page
here's the folders structure that i have now https://i.stack.imgur.com/bfo8s.png

React Component Sharing on Azure Artifacts

I need a React component sharing solution so components that I use in multiple applications keep synced. Let's say I have a TopBar component in 1 app of 10 apps I have, all of the rest apps would get the updated TopBar component. There are solutions like Bit.dev made for this job but, is it possible to do this using Azure Artifacts?
Note: To my understanding, Azure Artifacts is for packages and what I am looking to accomplish is component sharing, these are two totally different.
Azure Artifacts is a universal store for all the artifacts which you can use as part of development and deployment, includes NuGet, npm, Maven packages and Universal Packages.Azure Artifacts manages the dependencies used in your codebase and provides easy tools to ensure the immutability and performance of those components.
In your scenario, you can package your TopBar component as an Azure Artifacts and publish the artifact. Please follow this document to use npm to store JavaScript packages in Azure DevOps Services or TFS.

Insert React JS-JSX inside J2EE application

My objective is to add new UI screens based on React JS on an existing (JSP based) J2EE application running on local tomcat server. Yes, the ask is to add new screens using modern javascript/clientside technologies, but to retain the existing screens as it is.
I downloaded individual react.js and react-dom.js, added them to my J2EE project content, referenced them to the html page. In this way(Without having to install node JS or setup react dev environment), i'm able to achieve my objective, but i could use only plain javascript React.createElement to create the UI components.
But, i would also need to use the JSX syntax to speed up my developments. Now, to use JSX features, i learned that i had to do setup of Node JS, Babel, etc and have to build the application. This will not fit to my objective, as i don't need a standalone React application, but only need to create additional screens based on react to existing J2EE application.
So, I need experts recommendations to accomplish this. My questions are
If i setup the react+babel development environment and build an app, can i get the transcompiled JS files easily, so that i can take them and deploy to my tomcat server?
If so, is this the only way to achieve my objective OR is there a better alternative for quicker development?
You don't need expert recommendations its easy.
1) You can use create react app from create react app boiler plate from Facebook which gives everything from out of box.
https://github.com/facebook/create-react-app
2) React app needs a div to load js.
Keep generated js bundle from above step in J2EE application and load script on JSP page using script tags.
<script src="/reactbundle.js"></script>
<div id="root"> </div> // create this div in existing J2EE application in HTML or JSP file.
ReactDOM.render(<App />,document.getElementById('root')
);

Resources