Sanan
Sanan
KPCKevin Powell - Community
Created by Vandana on 9/13/2024 in #front-end
setInterval()
I think closure is causing issue- You might want to try the code below; it works function startUpdatingTitle() { let messageCount = 0; setInterval(()=> { messageCount += 1; document.title = (${messageCount}) New Messages; console.log(document.title); }, 1000); } startUpdatingTitle();
143 replies
KPCKevin Powell - Community
Created by Sanan on 9/12/2024 in #front-end
Create an Embeddable Widget with Remix and Vite
It’s a locally created app. perhaps I should push the code and then invite you to it
12 replies
KPCKevin Powell - Community
Created by Sanan on 9/12/2024 in #front-end
Create an Embeddable Widget with Remix and Vite
vite.config.ts import { vitePlugin as remix } from "@remix-run/dev"; import { defineConfig } from "vite"; import tsconfigPaths from "vite-tsconfig-paths"; export default defineConfig({ plugins: [ remix({ future: { v3_fetcherPersist: true, v3_relativeSplatPath: true, v3_throwAbortReason: true, }, }), tsconfigPaths(), ], build: { lib: { entry: "./app/widget-loader.js", name: "CustomWidget", fileName: "custom-widget", formats: ["es"], }, rollupOptions: { // input: "./app/widget-loader.js", output: { entryFileNames: custom-widget.[format].js, chunkFileNames: [name].js, assetFileNames: [name].[ext], }, }, }, });
12 replies
KPCKevin Powell - Community
Created by Sanan on 9/12/2024 in #front-end
Create an Embeddable Widget with Remix and Vite
The errors are listed below: Uncaught TypeError: Cannot read properties of undefined (reading 'future') Uncaught Error: There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering
12 replies
KPCKevin Powell - Community
Created by Sanan on 9/12/2024 in #front-end
Create an Embeddable Widget with Remix and Vite
Yeah, Actually I have a card component built with remix.js and vite. I created a widget-loader.js file to mount it, but I think there might be a configuration issue with the vite build step I set up. When I try to access it using the script tag: I encounter several errors. <script src="http://localhost:5174/build/client/card-widget.es.js" ></script>
12 replies
KPCKevin Powell - Community
Created by Sanan on 2/19/2024 in #front-end
Positioning Popover with Dynamic Card Heights
Thank you for sharing. I'll explore them as well 🙂
4 replies
KPCKevin Powell - Community
Created by vince on 10/21/2023 in #front-end
Image for heading
An informative article that explores various potential solutions could be helpful in this context https://css-tricks.com/css-image-replacement/
45 replies