choco
TTCTheo's Typesafe Cult
•Created by choco on 2/20/2025 in #questions
Simple typescript function
It has been several hours since I have been trying to create a simple function that I know is possible to create, because I once somehow managed to do that, but not now.
I just want to create a function that takes other functions.
...callbacks
Each of those functions will be called inside, and a single value will be passed (context). Context: It is an object that takes the result of the previous callback. execution.
so like [0]: number, [1]: {a: number}
The problem is that I cannot have a type of those results, but instead it displays as [x:string]:any
. Again once i somehow implemented it and now i just cant. Thank you for any help4 replies
TTCTheo's Typesafe Cult
•Created by choco on 1/28/2025 in #questions
Zustand question
i know that we should get count by
useStore((state)=>state.count)
right? But what about increment and decrement function, cant i just use useStore.getState.increment
? It is not like the inrement function re-render is needed for reactivity, there is nothing that depends on it?5 replies
TTCTheo's Typesafe Cult
•Created by choco on 12/26/2024 in #questions
can you style expo image picker?
title :)
2 replies
TTCTheo's Typesafe Cult
•Created by choco on 12/20/2024 in #questions
React Native and StoryBook
have someone used expo with storybook? I am trying to use both of them but keep getting too many errors
6 replies
TTCTheo's Typesafe Cult
•Created by choco on 12/14/2024 in #questions
How do you promote your apps :)
I don't believe in "good product speaks for yourself", just curios what is the way yall do it.
4 replies
TTCTheo's Typesafe Cult
•Created by choco on 11/2/2024 in #questions
Failed to verify URL
Hello everyone, question about
https://{{REGION_ALIAS}}.ingest.uploadthing.com/{FILE_KEY}
. does "Failed to verify URL" indicate error in ANY wrong specified parameters of url or only the signature one?4 replies
TTCTheo's Typesafe Cult
•Created by choco on 4/29/2024 in #questions
Typescript "implements"?
Hello, guys, i have two interfaces that have same name fields but different implementation, but i want when i create new interface without all fields from A in new interface, it should throws an error any help please?
5 replies
TTCTheo's Typesafe Cult
•Created by choco on 3/28/2024 in #questions
Maybe i am dumb, but how can i detect if dynamically component has loaded or loading.js have closed?
Can not figure it out. By loading.js i mean loading.tsx in app folder.
6 replies
TTCTheo's Typesafe Cult
•Created by choco on 2/9/2024 in #questions
Dumb plain js question
I am stuck on this about month or so, i want to disable scroll when scrollY equals my needed y. The problem is, before scrolling is disabled, if user will scroll little too fast, it would be scrolled some space before scrolling will be finally disabled, i am using Next.js but disable scroll with plain js.
7 replies
TTCTheo's Typesafe Cult
•Created by choco on 12/25/2023 in #questions
Scroll question
Hello guys, could you please help me. I have a long single page app (Next.js). And some components a horizontal scrollable, i really wanna do a thing when vertical scroll for a page blocks and you can scroll only horizontally in those components. I tried to make overflow : hidden, but you can scroll some space down before scroll disappears.
5 replies
TTCTheo's Typesafe Cult
•Created by choco on 12/22/2023 in #questions
Genius ask the Java problem question in Typescript relate server
I currently learning JAVA, so i rewriting my old JS algorithm from leetcode to practice JAVA.
the problem is this code right below make "Time Limit Exceeded" error.
but when you use same code but update else if else instead of just if guards it works fine.
i really can not understand why, because i tried to add "continue" at the end of every if statement and the same error occur when is should skip in that logic cicle.
Thanks in advance
7 replies
TTCTheo's Typesafe Cult
•Created by choco on 9/29/2023 in #questions
Does somebody know Rust and JAVA?
What code is more readable? Java or Rust?
9 replies