@velocitypartners/hello-world v1.2.0
Hello World Component
Overview
The Hello World component is a simple React component that displays a greeting message. This component can be easily imported and used in any React project.
Installation
If installing the package from npm, follow these steps:
Install the package (if it's published):
npm i @velocitypartners/hello-world
Import the component in your React file:
import { HelloWorld } from '@velocitypartners/hello-world';
If you're using the package locally, follow these steps:
Add the package to your project: Copy the
hello-world
folder into your project.Import the component in your React file:
import { HelloWorld } from './hello-world/';
Usage
Use the component in your JSX:
function App() {
return (
<div>
<HelloWorld name="Dave" />
</div>
);
}
export default App;
We've bundled styles with the component so be sure to include the stylesheet in your project - either at the top of your main file where you use the component:
import '@velocitypartners/hello-world/styles.css';
Props
The Hello World component can accept the following props:
name
(string): The name to be displayed in the greeting. Default is "World".
Live example
If you're unsure if you're seeing the component correctly, you can view a live example at https://velocitypartners.com/static-html/hello-world/