We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ecb34c0 commit 9c74542Copy full SHA for 9c74542
README.md
@@ -137,10 +137,13 @@ This package contains the global type files for React.
137
138
```tsx
139
// CodeBlock.tsx
140
-import React, {CodeBlockHTMLAttributes} from 'react';
141
-import '@heppokofrontend/html-code-block-element';
+import React, {useEffect, CodeBlockHTMLAttributes} from 'react';
142
143
export const CodeBlock: React.FC<CodeBlockHTMLAttributes<HTMLElement>> = ({children, ...props}) => {
+ useEffect(() => {
144
+ import(`@heppokofrontend/html-code-block-element`);
145
+ });
146
+
147
return (
148
<code-block {...props}>{children}</code-block>
149
);
0 commit comments