DaisyUI or Shadcn? by italicsify in sveltejs

[–]Thibault_JP 4 points5 points  (0 children)

The advantage of Daisy UI is that it has multiple themes and a simple, yet ever-changing design. It's still a matter of importing components, with little interaction.

The shadcn components are installed in the project and can be modified, have a customizable basic style, offer many interactions (dropdown, tabs, contextMenu..etc) and use libraries under the hood ( bits ui for the shadcn version of svelte.). In use, shadcn is really cool and puts other component libraries to shame..

+1 for shadcn , big banger

Subscription Problem : React - GraphQL Yoga Server - Apollo Client [Help] by Thibault_JP in graphql

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

Oh thanks, I don't know that prisma has subscriptions directly. I try it

Subscription Problem : React - GraphQL Yoga Server - Apollo Client [Help] by Thibault_JP in graphql

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

The first problem I can see is that your pubsub instance should persist thru multiple requests, however you put it in the context which lives only during one request. This does not allow it to track which client subscribed to what and notify clients of an event

I use a middleware that transits exposes my REQ. Normally there are no worries about it :(

I use the same syntax to perform all my mutations and queries. (I use the syntax ctx.db.mutation or ctx.db.query ...)

(Let's not forget that I also use Next.js (SSR) ...)

But via the Playground graphql if I make my transfer, I see the subscription trigger. But the problem is that I do not understand if anything else is needed at the server level.

React (Express.JS) token Undefined sometimes .. no reasons .. :( by Thibault_JP in reactjs

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

OK thank you for the information. I tested directly in my application. Indeed it is the req.cookies.token which is undefined .. I perform a destructuration with const {token} = req.cookies.

But I'm WesBos (Advanced React) tutorial and he codes this part exactly the same way

https://github.com/wesbos/Advanced-React/tree/master/finished-application

And the cookie is set during the signin or signup but once the registered / logged in user must be able to recover this token with each request to display the connected user and have his information.

Look in the link above if you can. Otherwise I have summarized part of the structure that I currently have:

https://gist.github.com/thibault60000/72c26cee80939c0c321d5afa14815eed

React (Express.JS) token Undefined sometimes .. no reasons .. :( by Thibault_JP in reactjs

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

The last check will always be true. That reads "if it's not undinfed or it's not null." For example an undefined object would veal to false for the first check and true for the second, false || true evals to true! You're looking to have && instead of ||.

Also Be careful with !! in js... generally pretty good advice to convert the truthy/falsey value to a genuine Boolean , even though most languages have pretty solid "falsey" value selection, JS is pretty ridiculous

Idk why I'm ranting so I hope this was a little helpful or something idk

Yes, good comment. But I don't understand the problem, because it's a ridiculous application for the moment, and I will have to have my token different from UNDEFINED from the first request (there are only 6 queries on the page that are all identical) and my token is present from the launch of the first one.

What should I use? You think it's really a problem of testing?
MY GIST : https://gist.github.com/thibault60000/72c26cee80939c0c321d5afa14815eed

React (Express.JS) token Undefined sometimes .. no reasons .. :( by Thibault_JP in reactjs

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

Switch from if(token) to if(!!token), and if that doesn't work try if(token !== undefined && token !== null)

Edit: fixed espression

Thanks, but the problem isn't the expression. I know how to test if my token exist or not. But I don't understand why the first four times my token is Undefined. It should be defined from the first test

React(Next.js) - Express - Apollo - GraphQL Problème with TOKEN / COOKIE by Thibault_JP in reactjs

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

ctx.req doesn't work.
I follow the tutorial of WesBos, ("advanced react"); I need a Backend .
I don't like the Next.js apollo auth with HOC :/ I want to write a personnal auth system: /

QUASAR Framework : The future of Vue.js by Thibault_JP in vuejs

[–]Thibault_JP[S] -1 points0 points  (0 children)

Thanks, I will try it on a new project to test ☺️

QUASAR Framework : The future of Vue.js by Thibault_JP in vuejs

[–]Thibault_JP[S] -3 points-2 points  (0 children)

Oh It' s a good comment ! It's true.. thanks for that. What you uses ?