Using the @basictech/react library with your React project
Install the @basictech/react library
cd project-name
into your project, run npm i
and install the @basictech/react
library in your app:Create a basic.config.ts file
basic.config.ts
in the root of your project. You can either do this manually, or go through the CLI flow to have it automatically created for you.Customize the config
basic.config.ts
file, and customize the schema in the file. You can copy your schema from the Basic dashboard and paste it into the file.Any changes you make to the schema in basic.config need to eventually be deployed to the Basic dashboard. Local changes would be for development purposes only.Add the BasicProvider to main.tsx
src/main.tsx
, add the BasicProvider to imports, and wrap your app in it.
Add a login button to App.tsx
src/App.tsx
and import signin
, isSignedIn
, and user
. Vite comes with some template code, but you can replace the contents with the following:Add a logout button