@bitcurve/flint-react-core
v0.0.4
Published
Atomic-level React components plus hooks and utilities for React development.
Downloads
1
Readme
@bitcurve/flint-react-core
Atomic-level React components plus hooks and utilities for React development.
Intended to be used in conjunction with @bitcurve/flint-tailwind
(a peer dependency) and alongside @bitcurve/flint-react-ui
.
Consuming this Package
Projects must add the build output of this package to their tailwind config file's content
array so that tailwind classes are properly processed during build.
If this step is not done the project's css will be missing styles for any tailwind utility classes used in this package that aren't also used in the project's own code.
The following example is for an example tailwind.config.ts
of a Vite project where the contents of any @bitcurve/flint-react-*
packages are included in the content
array:
content: [
// ...
content: ['./index.html', './src/**/*.{ts,tsx}', './node_modules/@bitcurve/flint-react-*/dist/**/*.js'],
// ...
]
Boilerplate Docs Generated By Vite + React Template
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
- Configure the top-level
parserOptions
property like this:
export default {
// other rules...
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
}
- Replace
plugin:@typescript-eslint/recommended
toplugin:@typescript-eslint/recommended-type-checked
orplugin:@typescript-eslint/strict-type-checked
- Optionally add
plugin:@typescript-eslint/stylistic-type-checked
- Install eslint-plugin-react and add
plugin:react/recommended
&plugin:react/jsx-runtime
to theextends
list