Skip to content

Add a Web Document Viewer component to a client-side app built with React.

License

Notifications You must be signed in to change notification settings

DevExpress-Examples/reporting-react-integrate-web-document-viewer

Repository files navigation

Reporting for React - Add a Web Document Viewer to a React App (Vite)

This example incorporates the Web Document Viewer into a client-side app built with React. The example consists of two parts:

  • The ServerApp folder contains the backend project. The project is an ASP.NET Core application that enables cross-domain requests (CORS) (Access-Control-Allow-Origin) and implements custom web report storage.

  • The react-document-viewer folder contains the client application built with React.

Quick Start

Server

In the ServerApp folder, run the following command:

dotnet run

The server starts at http://localhost:5000. To debug the server, run the application in Visual Studio.

Client

In the react-document-viewer folder, run the following commands:

npm install
npm run dev

Open your browser and navigate to the URL specified in the command output to see the result. The application displays the Web Document Viewer with the TestReport report.

Document Viewer in JavaScript with React

Files to Review

Documentation

More Examples

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)