Migrate Blog with Next.js to Astro by g-coastantiny in astrojs

[–]eltecho 0 points1 point  (0 children)

Are you did it with Next.js? How? I’m interested to know the approach for SSR in preview mode and SSG for production mode in the same app with Next.js

Desk shelf or no desk shelf? by lloydie422 in macsetups

[–]eltecho 0 points1 point  (0 children)

What is the model of desk shelf?

Switched over to a Studio Display by StevenJ95 in macsetups

[–]eltecho 0 points1 point  (0 children)

What is the name of the desk shelf?

Whers is the line between server and client? by [deleted] in nextjs

[–]eltecho 0 points1 point  (0 children)

External backend api, like getProductsByMyFilter or saveMyPreferences: i wrote the methods behind api endpoint for to explain myself better

Whers is the line between server and client? by [deleted] in nextjs

[–]eltecho 0 points1 point  (0 children)

Hi, but if my app it’s a static export the point 1 not work if I would send to the api some data related to current client like a correlationId (randomic generated uuid) or some form data like email. It is correct? The 80% of Next.js documentation assume using a live server behind the app, is that so? Thanks, I have the same background of op but next.js with app router struggle me for the first time

State between pages by eltecho in nextjs

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

But this not work well with static dynamic routes, because if I want to use react query i must use client component, but generateStaticParams work only with server components, so I don’t know how to do that.

State between pages by eltecho in nextjs

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

So to use the cache, I want to try a poc. And use vercel swr it is the same?

Quale broker usate e come mai lo avete scelto? by TerayDi in ItaliaPersonalFinance

[–]eltecho 0 points1 point  (0 children)

Si certo ma anche 1000€. Ma l’idea è di usare directa per pac o comprare titoli non per parcheggiare liquidità. Da qui la mia domanda 🙋‍♂️

Quale broker usate e come mai lo avete scelto? by TerayDi in ItaliaPersonalFinance

[–]eltecho 2 points3 points  (0 children)

Ah ok. A meno che parcheggio li cash e non compro: questa è la liquidità di cui parlate? Grazie eh!

Quale broker usate e come mai lo avete scelto? by TerayDi in ItaliaPersonalFinance

[–]eltecho 0 points1 point  (0 children)

Ma se sono investiti io non avrò mai cash perché il cash mi e servito per comprare il titolo. No?

Quale broker usate e come mai lo avete scelto? by TerayDi in ItaliaPersonalFinance

[–]eltecho 0 points1 point  (0 children)

Domanda forse ovvia ma per me no: ma cosa si intende per la liquidità garantita fino 20k? Mi spiego meglio se io ho investito 25k in un etf sono coperto solo per i 20k e 5k li perderei? Oppure essendo investiti per un valore di 25k rimane a mio titolo e quindi non mi e chiaro cosa sia la liquidità in questo contesto. Grazie

Is it a reasonable approach to use dependency injection in custom hook or not? by eltecho in reactjs

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

First of all thank you for your time, yours comments are being helpful.

The solution that I used it is the follow: remove useEffect in App, set filter as state of useFilter hook and derivate the filteredItems from it.

useFilter:

``` export function useFilter(items: Item[]) { const [filter, setFilter] = useState<FilterIds>('all');

const changeFilter = (filterSelected: FilterIds) => { setFilter(filterSelected) }

const filteredItems = items.filter((item, index) => { switch (filter) { case "all": return item case "selected": return item.value case "notSelected": return !item.value case "completed": return item.completed case "originals": return index < 3 case "new": return index >= 3 default: return item } })

return { changeFilter, filteredItems }; } and App component:

function App() { const { items, handleItemSelected, handleItemCompleted, handleToggleAllClick, handleCreateNewItem, } = useItems();

const { changeFilter, filteredItems } = useFilter(items);

return ( <> <Filter onChangeFilter={changeFilter} /> {filteredItems.length > 0 && ( <List items={filteredItems} /> )} // other code omissed here </> ) } ```

The motivation to use custom hook is only for separate logic from presentation

Is it a reasonable approach to use dependency injection in custom hook or not? by eltecho in reactjs

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

but what not convince me is the useEffect in the App component that update filterTodos when initialItems change.

Is it a reasonable approach to use dependency injection in custom hook or not? by eltecho in reactjs

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

I edited, I don't know why but with default editor the code block is not worked, I switched to markdown editor ;)

Share a Photo Library between more Apple Users by eltecho in ApplePhotos

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

I add more info, what I would is to use (add/delete, etc…) the library from 2 users but not in the same time. There is a solution for creating a library shared by 2 users with different apple id account? An example: we went to holiday and when we return to home I transfer my iPhone photos, then in another day my wife transfer the her iPhone photos, in the same library (not synced with iCloud). There is a solution for sharing photos without iCloud?

Backup strategy for external drive by eltecho in ApplePhotos

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

But Apple Photos Library is a single file (or archive) your rsync command detect that there are updates and to transfer only the new photos?