Components doesn't work
See original GitHub issueHi I used the Button
component and It didn’t apply style on it.
_app.tsx
import React from 'react'
import type { AppProps } from 'next/app'
import { VechaiProvider, Button } from '@vechaiui/react'
export default function App({ Component, pageProps }: AppProps) {
return (
<VechaiProvider>
<Button>e</Button>
<Component {...pageProps} />
</VechaiProvider>
)
}
tailwind.config.ts
export default {
mode: 'jit',
purge: [
'./pages/**/*.{js,ts,jsx,tsx}',
'./components/**/*.{js,ts,jsx,tsx}',
'./node_modules/@vechaiui/**/*.{js,ts,jsx,tsx}',
],
darkMode: false, // or 'media' or 'class'
theme: {
extend: {},
},
variants: {
extend: {},
},
plugins: [require('@tailwindcss/forms'), require('@vechaiui/core')],
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Why my components don't display on my React page?
In routes.jsx file. I'm guessing it should lead to main page, but for some reason the route doesn't match and components in App.js ......
Read more >REACT – Simple Intro Component Not Rendering?
The problem is that there are a few gotchas that make working with components difficult for those new to React.
Read more >Error Boundaries - React
Error boundaries are React components that catch JavaScript errors anywhere ... Error boundaries work like a JavaScript catch {} block, but for components....
Read more >FAQs - styled-components
If you think that the issue is in duplicated styled-components module somewhere in your dependencies, there are several ways to check this. You...
Read more >Why React Child Components Don't Update on Prop Changes
In React, it's a common problem to have child components that don't re-render when you expect them to. In particular, a common problems...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
i forget add
VechaiProvider
, after adding it, some styles apply, but still any styles didn’t work,like color. But i really need a ui library, so i copy all styles from the websitevechaiui.com
😂You must import tailwind styles in _app.tsx
globals.css
You can check basic setup here: https://stackblitz.com/edit/nextjs-pvx8qa?file=pages%2Findex.js