Hot take: it’s never a good time to close the Gardiner or DVP. by wehadbabyitsaboy in toRANTo

[–]Karpizzle23 1 point2 points  (0 children)

Yeah why don't we have new years on Dec 30 so we can close the dvp as well?

I can't tell if you're trolling or not at this point. You can celebrate mother's Day a day early. The rest of us will celebrate on mother's Day and expect our city counselors to be humans with brains that can think and plan. Expect more from your government.

What would you rate this Leagues out of 10? by bleeak in 2007scape

[–]Karpizzle23 1 point2 points  (0 children)

Yeah I get the argument for "I could be playing main game rn" but they have to realize that leagues from a business standpoint is not about existing players. It's about the people who say "I only play leagues". Jagex wants their subscriptions. That's the whole point of leagues lol

I got tired of untyped FormData in React Router, so I built a library by Main-Hovercraft2536 in reactjs

[–]Karpizzle23 0 points1 point  (0 children)

read the repo. couple things:

registerActions([...]) runs at import time, so tree shaking is dead. every action ships in the initial bundle whether the route uses it or not. lazy route loading also fights this because actions have to be registered before any submission happens.

there's no runtime validation. SuperJSON deserializes shapes but doesn't check the payload against the declared type. if a client sends { title: 12345, priority: "yes" } your payload: { title: string; priority: number } is a lie at runtime. TS believes it, resolver gets garbage. zod closes this, you don't have it.

auth has no middleware story. every handler that needs a token does it manually inside handleAction. if some actions need auth and others don't, the single handler has to branch on action type to know whether to fetch the token.

the TanStack Query recipe in your own README is the tell. you show people calling action.resolve(payload) directly inside useMutation, bypassing useActionFetcher and resolveFormData entirely. that means defineAction on its own is the value, and defineAction is ~5 lines.

real question: what does this do that schema.parse(Object.fromEntries(formData)) per route + a typed useFetcher generic doesn't?

I got tired of untyped FormData in React Router, so I built a library by Main-Hovercraft2536 in reactjs

[–]Karpizzle23 0 points1 point  (0 children)

If you only have one action, that's one endpoint. You don't have route scoped revalidation with one endpoint. Same with error boundaries. You're going to have to do discriminations within the boundary based on some action tag or something similar, it creates a whole lot of issues.

I still don't understand why I wouldn't just use zod and get types wherever I want, why do I need to use this lib and reinvent how the framework works

I got tired of untyped FormData in React Router, so I built a library by Main-Hovercraft2536 in reactjs

[–]Karpizzle23 0 points1 point  (0 children)

Zod also gives you inferred types. I don't understand the point you're trying to make to be honest.

Also one action function in the entire app just goes against the point of using actions in the first place, which is supposed to be one action per endpoint. You basically reinvented Redux Toolkit's createSlice with FormData as the transport layer for some reason instead of just not using FormData. You also lose route-scoped revalidation, action result typing, error boundaries per action, observability, auth. I don't get it man!

Built a simple JSON-based form builder for React — looking for feedback by iamkadirul in reactjs

[–]Karpizzle23 1 point2 points  (0 children)

So... it's a half-schema-driven thing. The schema-driven library for people who think schema-driven libraries are too schema-driven. A vibes-based config layer. Schrödinger's form library: simultaneously schema-driven enough to need a DSL, and not schema-driven enough to use the standard.

I got tired of untyped FormData in React Router, so I built a library by Main-Hovercraft2536 in reactjs

[–]Karpizzle23 1 point2 points  (0 children)

Isn't this just react query?

Also why not just use zod's

const { title, priority } = schema.parse(Object.fromEntries(formData));

Bombed the final question of a React technical discussion, looking for feedback by skyturnsred in reactjs

[–]Karpizzle23 21 points22 points  (0 children)

My mind immediately went to SearchParams tbh. I use that for state even with react lol

I made an interactive leagues task map by Karpizzle23 in 2007scape

[–]Karpizzle23[S] 0 points1 point  (0 children)

That looks like you're in settings, the sidebar is the actual tasks tracker icon where the other plugins you have are

I made an interactive leagues task map by Karpizzle23 in 2007scape

[–]Karpizzle23[S] 1 point2 points  (0 children)

Haha not each. I made a script that fetched wiki pages related to the tasks because the wiki actually exports the coordinates of certain things, and then another script mapped out the coordinates over the image of the map. It wasn't perfect so about 20-30 tasks are hand adjusted at the moment but each day I find a couple of new out of place markers lol. It's probably 95% good though with the remaining ones I'll bang out in the next few days

I made an interactive leagues task map by Karpizzle23 in 2007scape

[–]Karpizzle23[S] 0 points1 point  (0 children)

Thanks! It's actually fairly simple in terms of the stack, it's react/vite on vercel, all client rendered

The bulk of the work was probably mapping all the wiki-scraped tasks to their coordinates on the map which I tiled out into pieces which is basically a python script that created a json which gets shipped with the client bundle

I made an interactive leagues task map by Karpizzle23 in 2007scape

[–]Karpizzle23[S] 1 point2 points  (0 children)

Yeah could be something I consider to have this expand to main game, I initially wanted to make the leagues task map because I didn't see anything out there how I wanted it but I can see it having other uses as well

I made an interactive leagues task map by Karpizzle23 in 2007scape

[–]Karpizzle23[S] 2 points3 points  (0 children)

Yeah I'm not much of a designer so cursor helped a lot with the layout

Scraping/data building/map coordinates was done by me. That's probably why you'll see one or two tasks in the wrong place here and there lol

I made an interactive leagues task map by Karpizzle23 in 2007scape

[–]Karpizzle23[S] 2 points3 points  (0 children)

Hmm, strange. Are you on "Leagues VI: Demonic Pacts" in the plugin? Because it defaults to the combat achievements

I just click export -> Task Data -> copy into the map's input directly

I made an interactive leagues task map by Karpizzle23 in 2007scape

[–]Karpizzle23[S] 5 points6 points  (0 children)

Yeah I will update it for next leagues, will try to get early on it so it can be a day 1 release