React
Docs HomeProduct SiteSupport
  • WireBootstrap for React
  • Installation
  • React Component
  • Sample Project
    • WireComponent
    • Composing Components
Powered by GitBook
On this page
  • Project
  • tsconfig.json
  • ESLint Config

Installation

PreviousWireBootstrap for ReactNextReact Component

Last updated 1 year ago

WireBootstrap for React and its source code are available in GitHub at .

git clone https://github.com/WireBootstrap/react

The source code includes a sample project that demonstrates how to use WireBootstrap with React to build applications. It also includes the source code for the . The component can also be installed directly by itself from an NPM package.

npm install @wirebootstrap/wire-react

Project

The solution is a web project that demonstrates how to use WireBootstrap when developing applications in React.

After downloading or cloning the project, open it in a web application editor. The examples in this documentation use but any web editor can be used. The project has no web service dependencies.

The project was created using the with the . For details, visit .

In Visual Studio Code, open a terminal window and run npm start. This will install thenpm packages required to run the project and then open the application in a browser.

tsconfig.json

When using WireBootstrap with TypeScript projects including WireBootstrap for React, register the location of the WireBootstrap NPM scope root directory in the compilerOptions.typeRoots array inside the project's tsconfig.json file.

{  
  "compilerOptions": {
    "typeRoots": [
      "./node_modules/@types",
      "./node_modules/@wirebootstrap"
      ]
  }
}

ESLint Config

  "eslintConfig": {
    "rules": {
      "no-undef": "off"
    }

The Create React App template creates a project that uses to compile source code. This can conflict with the native TypeScript compiler. To address the conflicts, turn the no-undef ESLint rule off in the eslintConfig section in the package.json file.

ESLint
https://github.com/WireBootstrap/react
WireBootstrap for React Component
Visual Studio Code
create-react-app generator
React project Typescript template
Using React in Visual Studio Code
WireBootstrap for React Sample Project