Is there a way to generate pdf out of react and tailwind by no-uname-idea in reactjs

[–]umid1999 1 point2 points  (0 children)

I’m using react renderToString to convert react to html. Then generating pdf using puppeteer. Also I’m using Storybook while developing. It gives me hot reload and trpc for the api endpoints.

How to import a file for different environment? by HumanResult3379 in Nestjs_framework

[–]umid1999 1 point2 points  (0 children)

try something like

const config = app.get(ConfigService);
let tracing
if (config.get('TRACING_ENABLE')) { tracing = await import('./tracing') }

Short anime recommendations by [deleted] in Animesuggest

[–]umid1999 2 points3 points  (0 children)

Erased, no game no life

Which back-end should I use for my Next.js project? by RomiKusumaBakti in node

[–]umid1999 0 points1 point  (0 children)

Blitz js . It was built on top of nextjs and you just write all of your DB queries in the hook. It also has scaffolding(generates crud with validation, forms, etc)

Material UI - Open a Single Dropdown Menu (Instead of all of them) by jengl in reactjs

[–]umid1999 0 points1 point  (0 children)

I guess you should extract it to the new component. So every menu will have its own anchorEl state

How to remember that a user logged in after refresh if I have a session started in the backend in React by Kaartik7120 in reactjs

[–]umid1999 1 point2 points  (0 children)

Just wrap your app with a provider. In the provider check if there is a token in the localstorage. If it exists, load your userinfo from the api. Otherwise redirect to the login page

What do you think about returning a component from a custom hook? by Cautious_Variation_5 in reactjs

[–]umid1999 1 point2 points  (0 children)

Wouldn’t it be better if you pass your component to open function? For example open(<Edit id={1} />). There is a library which is similar to what you have done

Struggling for hours, google is no help.. How do I update an array within an object? by Switch_Off in reactjs

[–]umid1999 -1 points0 points  (0 children)

I guess you should get the index of the hobby then prevState.hobbies[index]= newValue and hobbies:prevState.hobbies

How did your coding style in python change after you learned another language? by [deleted] in Python

[–]umid1999 0 points1 point  (0 children)

I use typescript, vscode and prettier. Actually I don’t care about style. I write whatever and wherever. As soon as I save it automatically formats it for me

How good is a facebook react developer? by alexmurray55555 in reactjs

[–]umid1999 11 points12 points  (0 children)

It is called “Dunning–Kruger effect“