https://github.com/kingstinct/react
https://github.com/kingstinct/react
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/kingstinct/react
- Owner: kingstinct
- Created: 2022-07-13T08:26:47.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-02-06T06:25:06.000Z (over 2 years ago)
- Last Synced: 2024-12-30T06:47:02.869Z (over 1 year ago)
- Language: TypeScript
- Size: 2.87 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
⚠️ This repo has been moved to [Kingstinct/zemble](https://github.com/kingstinct/zemble/tree/main/packages/react), and has been renamed to [`@zemble/react`](https://www.npmjs.com/package/@zemble/react).
# @kingstinct/react
[](https://www.npmjs.com/package/@kingstinct/react)
This is a utility library for React that we use across our projects at Kingstinct (still early days for this lib).
To import a utility the best is to import it directly:
`import useEvent from '@kingstinct/react/hooks/useEvent'`
You can also use named imports, but if you're not having all dependencies installed you'll probably run into errors:
`import { useEvent } from '@kingstinct/react'`
The goal of this library (and the related [@kingstinct/utils](https://github.com/Kingstinct/utils)) is to:
- Keep the number of dependencies in projects down
- Have a common place to put useful utilities, so they're easier to maintain and find
- Quickly get up and running with new projects
We believe this is a better approach than the alternatives:
- Using one single utility library for everything, which would introduce unnecessary dependencies
- Using lots of micro-libs. Micro-libs does have it's advantages, but is harder to maintain and means loosing oversight of the dependencies in a project.
- Copy pasting between projects :)
# Storybooks and Expo
Currently the Storybooks implementation works for web and the example-app works with Expo for mobile.