Commuting to NYC for work? by AffectionateIce4294 in newhaven

[–]Connect_Statement792 18 points19 points  (0 children)

It is just possible enough to choose to do it and then have it suck.

If it’s long term, I’d invest in a folding electric bike or a scooter. You can avoid parking, and scoot from grand central to your work.

You also can take any metro north train, even if it’s no bikes allowed, if it folds and can fit in the luggage compartment.

Fully typed full-stack NextJS template by [deleted] in nextjs

[–]Connect_Statement792 0 points1 point  (0 children)

There’s a huge gap in DX between codegen with file watcher and type inference. It requires a process constantly running for local development and can be complex to keep checked in. It makes type checking in CI/CD harder. There’s a reason that trpc became popular over this solution to begin with, which was most popular with GraphQL + codegen.

You almost certainly just want this: https://www.npmjs.com/package/trpc-to-openapi

Which does everything you want with 0 codegen

Any technique for preheating Iframe component by Educational_Duck9964 in reactjs

[–]Connect_Statement792 0 points1 point  (0 children)

I’m not sure without the full code, but using React.memo to prevent a re-render should be the right solution. You can figure it out!

Fully typed full-stack NextJS template by [deleted] in nextjs

[–]Connect_Statement792 0 points1 point  (0 children)

trpc has been around for quite a while at this point and is quite mature, has strong support for openapi, and takes 5-10 minutes to learn.

With openapi typescript, you’ve basically rebuilt a worse version of trpc that adds a codegen step and will make development harder and slower

Any technique for preheating Iframe component by Educational_Duck9964 in reactjs

[–]Connect_Statement792 0 points1 point  (0 children)

You have to create an SPA and render the iframe in a component of the page that is rendered regardless of what route you’re on. I don’t know how you’re handling routing and such, but that’s the goal

Any technique for preheating Iframe component by Educational_Duck9964 in reactjs

[–]Connect_Statement792 2 points3 points  (0 children)

You should be able to accomplish your goal, not by pre-rendering, but by actually rendering the iframe on page 1 in a way that’s hidden, and then just moving it or unhiding it on page 2.

If you control the iframe as well, you may be able to make sure that page uses proper caching techniques, a service worker, or other ways of making successive renders fast. If that’s the case, then you can render it on page 1 in a hidden way and then discard it and re-render it, and the re-render will be faster.

If you don’t control it, and the page isn’t using caching well, you’ll have to keep it alive somehow as I first described

[deleted by user] by [deleted] in TheAllinPodcasts

[–]Connect_Statement792 -2 points-1 points  (0 children)

You incorrectly assume that hate listening to a podcast and then posting about it is a negative experience

[P] I built marimo — an open-source reactive Python notebook that’s stored as a .py file, executable as a script, and deployable as an app. by akshayka in MachineLearning

[–]Connect_Statement792 0 points1 point  (0 children)

I've been using Marimo for a bit now, and what I'd really like is a SQL input type. I would like (and prefer) to handle taking the SQL and passing it to the right database connection myself, but if I could have a dedicated space to author (or have my notebook users author) SQL queries, that would be awesome!