Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dolthub/react-library
A React library of general-use components, hooks, contexts, and utilities
https://github.com/dolthub/react-library
Last synced: about 2 months ago
JSON representation
A React library of general-use components, hooks, contexts, and utilities
- Host: GitHub
- URL: https://github.com/dolthub/react-library
- Owner: dolthub
- Created: 2023-12-01T22:35:40.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-01T18:53:07.000Z (3 months ago)
- Last Synced: 2024-10-28T13:54:55.747Z (2 months ago)
- Language: TypeScript
- Homepage:
- Size: 4.31 MB
- Stars: 3
- Watchers: 5
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.dev.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# Developer notes
## Testing a package in a local app
Using [`yalc`](https://github.com/wclr/yalc) is the best way to test a library in another
local package.First, choose a package to compile and build:
```zsh
% cd packages/hooks
hooks % yarn dbuild
```And publish to `yalc`:
```zsh
hooks % yalc publish
```The `yalc:publish` script will also achieve the above.
Then in your app, link to this package:
```zsh
other-app % yalc link @dolthub/react-hooks
```And you will see and up-to-date version of the `react-hooks` package. When you make a
change to the package, you can push the change by running `yarn yalc:push` and you should
see it automatically reflected in your app.To remove the yalc package in your app, run `yalc remove --all`.
## Watch mode
You can use `yalc` to watch for changes in the `components` package and automatically push.
1. In the root of `react-library`:
```bash
yarn && yarn dbuild
```2. Publish the `components` package, in `packages/components`:
```bash
yarn yalc:publish
```3. Link the local package in your app:
```bash
yarn yalc @dolthub/react-components
```4. Start watch mode in `packages/components`:
```bash
yarn dbuild:watch
```5. Make the changes, wait for the watch to finish building and pushing.
6. Refresh the page in your browser to see the change.