Closed rizaldirnm closed 9 months ago
well that is super weird
it seems like a react native web problem. does importing from react-native and using the style
prop fix it?
i also wonder if an older next.js would work
export function StylesProvider({ children }: { children: React.ReactNode }) {
useServerInsertedHTML(() => {
// @ts-ignore
const sheet = StyleSheet.getSheet();
console.log(sheet)
return (
<style
// dangerouslySetInnerHTML={{ __html: sheet.textContent }} // --> I comment this
id={sheet.id}
/>
);
});
return <DripsyAppProvider>{children}</DripsyAppProvider>;
}
when I comment:
// dangerouslySetInnerHTML={{ __html: sheet.textContent }}
Its work....
Is there any idea what side effect when I comment this? :D
oh you’re using the app dir for this right?
could you try pages folder? dripsy won’t work well with the app dir
Oohh yes. No issue if using Page Router.
Thankyou
Its look like
default style
replacedsx style
props.The result
123
should have background-color blue but turns out still black because there is default classname. (see the screen shoot)next.config.js
What did I wrong ?
Thank you in advance