harshcut
Explore posts from serversTTCTheo's Typesafe Cult
•Created by harshcut on 5/24/2024 in #questions
Scaling page with respect to viewport width
Is there a way to scale a web page completely with respect to viewport width? All components should have the same aspect ratio.
I was thinking this has something to do with the
<meta name="viewport"
but not sure.4 replies
TTCTheo's Typesafe Cult
•Created by harshcut on 4/10/2024 in #questions
Streaming file from Client to Server to S3
I am working on a side project in which i need to upload data to an s3 bucket.
The user will select a large file on the React frontend and upload it. The file is sent to an Express.js server that will pipe/stream the chunks to an s3 bucket as soon as they arrive.
Is the
formData
that i send from the client to server a readableStream
?
14 replies
TTCTheo's Typesafe Cult
•Created by harshcut on 2/25/2024 in #questions
`MaxListenersExceededWarning` on using `tailFile.on` inside `socket` connection
(node:4068) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 update listeners added to [TailFile]. Use emitter.setMaxListeners() to increase limitnew event listners (
tailFile.on('update')
) are created whenever new socket connection is established, causing the above warning. what could be better wat to handle this? TailFile
class extends events.EventEmitter
.
2 replies
TTCTheo's Typesafe Cult
•Created by harshcut on 9/28/2023 in #questions
Take-home assignment
I have a take-home assignment in which i need to implement a multi-column (not separate lists) drag and drop component in React without using any libs.
Using html drag and drop apis was easy, but it didn't look exactly like this (video below).
Then i used mouse events, and could only make it work (https://react-dnd-harshcut.vercel.app/) with single column.
Does anyone one have any suggestions on how to proceed for two-column layout?
My next thought would be calculating the position of the cursor on left or right side of the container and shifting the list items in it.
Seems like a lot of work just for a take-home assignment.
4 replies
TTCTheo's Typesafe Cult
•Created by harshcut on 7/2/2023 in #questions
importing data into [slug]
i have a '/craft' page where i display all the craft titles. at '/craft/{id}' i have to display a specific craft.
how do people usually import the data for slug pages depending upon the id? also how do you import custom components for specific pages?
20 replies
TTCTheo's Typesafe Cult
•Created by harshcut on 6/18/2023 in #questions
is this the correct use of usecallback?
7 replies
TTCTheo's Typesafe Cult
•Created by harshcut on 4/21/2023 in #questions
help with prisma schema (coming from sql)
3 replies
TTCTheo's Typesafe Cult
•Created by harshcut on 3/25/2023 in #questions
Right way to install deps in a Monorepo?
i have a question regarding installing and managing dependencies in a monorepo. i currently have a repository with yarn workspaces enabled and turborepo. the workspaces are — client, server, ui. all these workspaces use typescript and few @types/~ as dev dependencies along with other packages.
should i install the dev dependencies that are same in every workspace in the root of monorepo or in each workspace separately? what i want is a guide to installing deps the right way in a monorepo.
1 replies
TTCTheo's Typesafe Cult
•Created by harshcut on 2/15/2023 in #questions
Compiling TailwindCSS for Monorepos
I have a monorepo with workspaces - ui and client. I want to create components in ui and use them in client. I am using tailwindcss as my style provider, but am having a very hard time compiling it.
I am not going to publish them on NPM, and it just need to work in client which is a nextjs project. Any help is appreciated.
18 replies
TTCTheo's Typesafe Cult
•Created by harshcut on 12/23/2022 in #questions
Want to create a collaborative editor with Next.js
I am currently trying to figure out yjs with next.js. Are there any better alternatives for react based applications?
12 replies