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

@space-uy/cra-template-spacedev

v1.0.1

Published

The official template used by SpaceDev 🚀 for Create React App.

Downloads

24

Readme

cra-template-spacedev

Node.js Package

The official template used by SpaceDev for Create React App

Usage

npx create-react-app my-app --template @space-uy/cra-template-spacedev

What this includes

We tried to include all the libraries we use in all our projects and some more to improve performance, developer experience and user experience.

Here are the libraries and extras we included:

How do I structure my project?

Just follow the examples in all the features. CONTRIBUTING.md has a more detailed explanation.

If you have reusable components you need put them in the components folder.

If you have a new feature, be it a redux slice for something alone or maybe it has a screen that you'll later navigate to, put it in the features folder. See how the counter feature is mapped to a folder called the same way with the component inside it and its redux slice and api helpers?

When you have strings you need to show in your UI they go in localization/en.json because if you later want to translate the app you'll be ready to do that without any major hassle. An example of how to access those strings can be found in the counter/Counter.js component.

When you begin, update your theme to match your app. Read this to know how.

In the app folder there are shared files only, there is the redux store configuration, the apisauce client configuration and global services like the fileUpload function.

How do I style my components?

const MyComponent = () => {
  const classes = useStyles();
};

const useStyles = makeStyles((theme) => ({
  self: {
    width: '90%',
    marginLeft: 'auto',
    marginRight: 'auto',
  },
  // ...more styles...
}));

Read this link for details.

Making API requests

Follow these steps:

  1. Update the REACT_APP_API_URL variable in the .env file
  2. Use the makeApiCall higher order function in your api files like the following snippet
import makeApiCall from 'app/makeApiCall';

// the following does a post request to your server to the
// baseUrl + 'something' with the data variable as its body
const fetchSomethingFromTheApi = makeApiCall((client, data) => client.post('something', data));

How do I upload files?

The useImageUpload hook or the others you can find to upload other types of files in our knowledge base work like so:

const [progress, handleUpload] = useImageUpload(onValueChange);

Think of that onValueChange function it receives as what would be (value) => setFieldValue('coverUrl', value) in formik.

Since we recommend you use formik but we can't use hooks inside the formik context we recommend you make a separate component to call this hook and get that function as a prop.

Other than that, all you need to do is to have you api client properly setup and the POST /storage endpoint configured like it is in our other knowledge base article.

:computer: Contributing

Contributions are very welcome. Please check out the contributing document.

:bookmark: License

This project is MIT licensed.