#Getting Started
#Install
Make sure you've set up a project with Node.js and a package.json
file. Then, install hello-next-js
with your favorite package manager.
With npm:
npm install --save hello-next-js
With yarn:
yarn add hello-next-js
#Use
Add the hello-next-js
components to your application:
import React from 'react';import {Alert, Button} from 'hello-next-js';export const MyComponent = () => {const [showAlert, setShowAlert] = React.useState(false);return ({/* The <Alert /> will render when showAlert is true */}{showAlert && <Alert variant="success">It's an alert!</Alert>}{/* The <Button /> toggles showAlert */}<ButtononClick={() => {setShowAlert(!showAlert);}}>Toggle alert</Button>);};