npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-vitae

v1.0.9

Published

Build a personal resume in seconds with JSON resumes and React

Downloads

61

Readme

React vitae

GitHub GitHub stars Build Status codecov

react-vitae is a set of strongly typed and battle tested React components and hooks that enable you to connect a json-resume schema to your components and build great looking resumes from a standardized schema.

Installation

You can install react-vitae with NPM or Yarn.

npm install --save react-vitae or yarn add react-vitae

Usage

The main react-vitae package includes the TypeScript types for the standard JSON resume schema and a set of components.

Writing the resume file

The JSON resume repo provides all the tools to create and validate your resume file.

If using TypeScript, you can use the type suggestion and auto-completion feature of your IDE to create the schema using the provided types.

import { Resume } from 'react-vitae';

const resume: Resume = {};

The resume provider

The components need the resume file to be provided at the root of your application, if you have used redux or react-router before, this pattern should be familiar.

import { ResumeProvider } from 'react-vitae';

const resume = {};

export const App = () => (
    <ResumeProvider resume={resume}>
        {/* Your application goes here */}
    </ResumeProvider>
);

Using hooks

The package exports a set of custom hooks to retrieve the resume or part of it.

All have the same signature: useElement(): type and return type specific type they represent.

Using Higher-Order components

The package exports a set of hocs to retrieve the resume or part of it and inject them in an augmented component.

All hocs will add a new prop to the augmented component named after the type in lowercase, for example.

import { withResume } from 'react-vitae';

const Component = ({ resume }) => { 
    // ...
};

export default withResume(Component);

Using render props

The package exports a set of components to retrieve the resume or part of it and use them with the render prop pattern.

They will all execute the render prop function with an object containing the resume element named after the retreived type in lowercase, for example.

import { WithResume } from 'react-vitae';

export const Component = () => (
    <WithResume>
        {({ resume }) => {
            // ...
        }}
    </WithResume>
);

Themes

React-Vitae previously included two ready made themes to quickly create resumes with. These themes are deprecated and are only kept for reference.

See each theme's readme for instruction on usage and how to install them.

Help needed

Any Pull Request will be reviewed and merged if it looks good, all help is appreciated!

Development

Installing the dependencies

Running npm install in the project's root directory will install everything you need for development.

Running Lint

npm lint will run eslint in all packages at once.

Running Tests

npm test will run the tests in all packages at once.

Publishing

Publishing is done manually at the moment using the npm publish command.