Adek
Adek
TTCTheo's Typesafe Cult
Created by Adek on 6/8/2024 in #questions
What would you use for a global state management? - Initalization from API needed
Hello, So long story short, I would like to have a global state management for my advertisements and want to display in multiple components(maybe even in the sidebar). This ads can have dynamic styling(like row-span-2, col-span-2 in a grid case). The initial advertisements should come from server so the initialization need to be a fetch call (or something else). What do you guys would recommand? My approach with Zustand failed(I'm still trying). This state should have a nextAdId too, which represents which ad should be rendered next. Thanks demo-repo(the code quality is bad): https://github.com/DZsolt01/nextjs-zustand-demo
57 replies
TTCTheo's Typesafe Cult
Created by Adek on 10/22/2022 in #questions
TW-Elements
Hello! I'm trying to add tw-elements to the project and I get this error:
Could not find a declaration file for module 'tw-elements'. 'c:/Users/Adek/Documents/nextjs/my-t3-app/node_modules/tw-elements/dist/js/index.min.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/tw-elements` if it exists or add a new declaration (.d.ts) file containing `declare module 'tw-elements';`
Could not find a declaration file for module 'tw-elements'. 'c:/Users/Adek/Documents/nextjs/my-t3-app/node_modules/tw-elements/dist/js/index.min.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/tw-elements` if it exists or add a new declaration (.d.ts) file containing `declare module 'tw-elements';`
I followed the tw-elements installation guide, I have problem with importing the js
7 replies