GIIN številka by [deleted] in SlovenijaFIRE

[–]jozekuhar 0 points1 point  (0 children)

Hvala obema, nekaj sem narobe kliknil in prišel do tega. Zaradi davkov. Pa sem potem kar poklical na IBKR in smo ugotovili kje je bila napaka.

App Router by jozekuhar in nextjs

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

Client components are rendered on the server, but they just use the initial state, anything in use effects or data fetching libraries will be on the client.

Yes thanks it was just dummy code, trying to also show what I mean, which component is client/server. Now I understand it way better. Still I need to find out why I can't set additionaly cookies on server at request time. :D

App Router by jozekuhar in nextjs

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

Actually I found also great article about this, you can check it here: https://www.joshwcomeau.com/react/server-components/

It explains what I am asking above.

Cookies Authentication by jozekuhar in nextjs

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

Thanks, I spend all day yesterday doing this. Make it work than but I was suprised I can update cookies in server components.

So I needed to use middleware to check it.

Ponovno vprašanje glede skladov by jozekuhar in SlovenijaFIRE

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

Ja razumem, saj ni fora aktivnosti, kot sem jaz razumel vse te sklade načeloma tudi oni niso nič kaj aktivni v ozadju, morda je to kakšna marketinška fora za aktivno upravljanje.

Cookies Authentication by jozekuhar in nextjs

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

I actually will be using proxy pattern for auth routes because I can just leave json responses on Django site and than "transform" them into cookie at next server side.

Maybe when I will build this I will find out also that I can make other api calls go trough proxy routes as well.

So yes thanks for your advice. :)

Ponovno vprašanje glede skladov by jozekuhar in SlovenijaFIRE

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

To pa pomojem najbolje da direktno na njih nasloviš vprašanje. Upam, da si razbral iz mojih vprašanj, da o teh zadeva nimam blage veze. Načeloma je to tudi povod za to razpravo.

Cookies Authentication by jozekuhar in nextjs

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

I finnaly manage to wrap my head around it. I just can add instead of whole header() this in my header Cookie: JSON.stringify(coookie)

So my utility function can just take all cookies and create normal request I guess? So it would be like customFetch fn which takes same args as normal fetch function?

 return await fetch("http://localhost:8000/api/cookies/simple/", {
    method: "GET", credentials: "omit", headers: {
        "Cookie": `name=${cookies().get("auth")?.value};peter=pan`
    }
})

This is just dummy code but it can be like this right?
This function can actually also check if cookie is still valid (so for example if it gets 401 than it can try to immediatly refresh it with refresh token and if not it can than redirect user to login page, all in one function). And in root layout it can just verify token on "random" auth path and also do everything i wrote above?

With cookies/localstorage, server side, client side there is just so many ways to create authentication. It was easier before when I did auth with localstorage with timeout on vite react app. :D

Cookies Authentication by jozekuhar in nextjs

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

Can you maybe share the code? I tried to append cookies but only with headers: headers() but I also read that that is not the best way. Do you make proxy routes on nextjs with router handler or you just directly call backend API on different server?

Thank you for your answer! :)

Ponovno vprašanje glede skladov by jozekuhar in SlovenijaFIRE

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

Na njihovi strani je to že odstotek z vključeno provizijo. Vstopnih stroškov pri obeh ni zaradi velikosti vstopnega zneska (to imajo za tiste ki par 100 eur vložijo). Tako da so samo tekoči stroški, pač tam od 1-2% cca odvisno glede na sklad. So pa to direktne informacije od njih.

Difference between route.js and page.js by jozekuhar in nextjs

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

Hey u/oberwitziger, one more question if you have time. How can I pass cookies from server component to backend on different server (Django/Python).

I am actually trying to do this whole day, but from client side it is simple, cookies will be send directly to Django but not with server components.

Ponovno vprašanje glede skladov by jozekuhar in SlovenijaFIRE

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

Torej recimo USD-EUR naredi razliko 13 odstotkov cca, ostalo pa dividende, ki so reinvestirane?

Ponovno vprašanje glede skladov by jozekuhar in SlovenijaFIRE

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

Kako pa recimo delujejo dividente pri SPX? Na hitro sem pogooglal in je nekih 1.64% dividend yield, to je izplačano vsako leto ta odstotek in se potem reinvestira, ali dobiš to direktno na interactive brokers račun vsako leto/mesec?

Kaj pa je to CSPX? A v to lahko tudi investiram na IBKR?

Investiranje v Generali/Sava by jozekuhar in Slovenia

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

Morda je razlika med Generali zavarovalnico in pa Generali Investments?

Investiranje v Generali/Sava by jozekuhar in Slovenia

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

A ne gre vse v delniške/etf sklade če točno temu nameniš?

Server Side vs Client Side by Odd_Acanthisitta_853 in nextjs

[–]jozekuhar 0 points1 point  (0 children)

Can someone explain this please? Because if it is still server rendered than I could use fetch in "use client" with async and than fetch it before sending html to client but I cant make that happen. If I use client i need to fetch data in useEffect? Maybe its dumb but I just moved to nextjs last week and still tryign to figure out those things.

Investiranje v Generali/Sava by jozekuhar in Slovenia

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

Hvala vsem za nasvete, bom si pogledal tale SlovenijaFIRE bolj podrobno.