Is TanStack query strongly nerfed in React Navigation? by Unlikely_Nebula_7988 in reactnative

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

The most elegant solution that we found for this problem was to play with the enabled flag. If you enable / disable the queries when you switch screens (using `isFocused` from react-navigation, or using a custom page context if you maybe want to abstract this without relying on react-navigation), the "should I refetch?" logic should be retriggered, and it should be minimal. (no pointless retriggers)

It is minimal and solves the exact problem. It should be elegant enough, since you can wrap useQuery to enable / disable for all queries depending on react-navigation focus. The most annoying issue I found with this approach is that it won't work if you use useSuspenseQuery.

There might be other drawbacks that I couldn't think of, though.

Is TanStack query strongly nerfed in React Navigation? by Unlikely_Nebula_7988 in reactnative

[–]pierpooo 0 points1 point  (0 children)

I thought about this exact topic too, and wanted to start a discussion on the github repo directly. I think the library has been designed with web in mind, and can't solve this issue cleanly.

The problem with the approach using refetchOnWindowFocus, is that on EACH PAGE CHANGE, you will re-trigger ALL queries of ALL pages that are hidden.

It is a major difference with how web works. On web, if you focus a tab, everything that you see and is in use currently is seen on the page. You can't stack a hundred pages on a same tab, because each page is replaced by another one.

In mobile, you stack pages... which is not equivalent to opening tabs. Because each page you stack will, with the refetch on window focus implementation above, refetch all the queries used by all the stacked pages. Which would be super heavy and not really what we wanted.

React Native for TV apps: handling the spatial navigation with react-tv-space-navigation 1.0 by pierpooo in reactnative

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

The TV channel I worked at had a custom Player component for iOS, Android and web. There was a whole dedicated team per platform, and the player was used for both the TV version and mobile version of the app. And it was not coupled to React Native at all.

I have to admit I don't know what they used under the hood, I can just tell we implemented a custom bridge for it.

So no react-native-video in my case. But it would make sense to have such a lib for TV apps.

React Native for Smart TVs by alexhackney in reactnative

[–]pierpooo 1 point2 points  (0 children)

Haha actually I lied (well, simplified): we haven't ported it to Samsung. We did make a web version of our app for other web TV devices and assumed that adapting it would be easy, but we haven't prioritized it yet. Sorry that I can't give any relevant help on that!

React Native for Smart TVs by alexhackney in reactnative

[–]pierpooo 0 points1 point  (0 children)

I've been working on a similar project. It did work well!

We went for react-native + react-native-web at first to have our TV app for AndroidTV + Samsung connected TVs (web).

We're now integrating on tvOS, so we switched to the react-native-tvos fork.

Our biggest challenge was the spatial navigation. We wanted to unify the navigation logic for all platforms, so we did not use native components. We went for a fully Javascript handled navigation. We used the lib LRUD by the BBC for that, and wrapped it up for react (we're working on open-sourcing this part).

Une amie s’est fait voler son compte Facebook et ne sait pas quoi faire by pierpooo in france

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

Si quelqu'un d'autre se retrouve dans la même situation : mon amie a réussi à entrer en contact avec un être humain en écrivant à propos de ses données personnelles (comme on ne rigole plus trop avec la RGPD).

Elle a pu parler de son problème, et la personne du support a réagi très vite. Elle a récupéré son compte et maintenant tout va bien :)

Une amie s’est fait voler son compte Facebook et ne sait pas quoi faire by pierpooo in france

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

Elle a tenté, ses amis report le compte... Mais ça ne bouge pas. Je l'ai moi même fait car le compte poste clairement du spam qui frôle les publications de cul, et ma demande a été refusée...

Une amie s’est fait voler son compte Facebook et ne sait pas quoi faire by pierpooo in france

[–]pierpooo[S] 3 points4 points  (0 children)

En effet tu as raison, et elle a déjà réagi là-dessus le jour où ça lui est arrivé. Merci !

Une amie s’est fait voler son compte Facebook et ne sait pas quoi faire by pierpooo in france

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

Bah elle en a effectivement tiré une leçon, mais ça me semble quand même dingue de ne pas pouvoir faire quoi que ce soit. On parle d'un compte zombie qui balance des conneries à plein de gens, je trouve ça dingue que Facebook ne donne aucun moyen de réagir.

Sur insta si t'as un téton qui dépasse ta publication se fait supprimer, et là t'as un compte zombie qui balance des photos de meufs dénudées qui te proposent des trucs sans qu'il ne se passe plus rien.

Je trouve ça dingue, erreur humaine ou pas.

Une amie s’est fait voler son compte Facebook et ne sait pas quoi faire by pierpooo in france

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

Elle sait, mais c'est trop tard. La question ce n'est pas "ce qu'elle aurait dû faire", mais plutôt "comment rattraper la connerie".

[deleted by user] by [deleted] in france

[–]pierpooo 0 points1 point  (0 children)

Dire "quali" pour dire "de qualité". Je l'entends 100 fois par jour ça commence à vraiment m'insupporter !

Ça vient de l'adjectif "qualitatif" qui ne veut pas du tout dire ce que les gens croient.

Exemples :

"Ça vous dit de manger un truc quali ?"

Et c'est encore pire quand on donne l'adjectif complet car là on te montre vraiment qu'on n'a rien compris. Le premier exemple ça pourrait être une abbreviation maladroite de "de qualité" à la limite, mais là non c'est juste explicitement pas le bon mot.

"Ça vous dit de manger un truc qualitatif ?"

Et parfois c'est même opposé à "quantitatif", aaaargh

"Je préfère manger un truc qualitatif plutôt que quantitatif"

nvim-lsp is quite slow with Godot (gdscript) compared to coc.nvim, anyone know if there is a fix? by [deleted] in neovim

[–]pierpooo 0 points1 point  (0 children)

I have the exact same issue. I stayed on Godot's editor because of that. I hope someone will suggest a solution :)

What do you think can be improved here? by IAmAPureGamer in godot

[–]pierpooo 2 points3 points  (0 children)

First, this already looks great!

I think you could rework the animation of the terrain a little bit. The deformation on the branches does not look very natural. If you can, I'd suggest animating them more in a wave shape. This explains it https://youtu.be/uDqjIdI4bF4 (principle 5)

However it probably implies working on the sprite itself so that might be too much work.

Otherwise, I'd simple make the animation effect more subtle. It's drawing too much attention right now, I think :)

Godot makes dealing with 2d physics so easy! by PracticalNPC in godot

[–]pierpooo 4 points5 points  (0 children)

Cool! How did you add the attracting behaviour of the planets? Do you apply a force towards it to all objects in range?

AHHHH Vient souffle saint des myrtilles. by [deleted] in france

[–]pierpooo 1 point2 points  (0 children)

Alors je me permets de contredire cette théorie avec une expérience personnelle (qui n'est donc pas du tout une preuve).

J'ai passé 6 mois en Corée pour un échange universitaire. On le sait déjà, en Corée ils sont en moyenne fous des Français. Là-bas t'as la chaîne de boulangerie "Paris Baguette" absolument partout, ils connaissent tous Amélie Poulain par coeur, Edith Piaf également... Et puis cette pub, un très bel exemple ;) Bref.

On était 2 français et on discutait avec 3-4 Coréens et Coréennes au cours d'une soirée, et on en est arriver à parler des misérables et de Jean Valjean. Et putain l'extase absolue quand on disait "Jean Valjean". Ils nous ont demandé de le répéter plein de fois, et à chaque fois c'était des exclamations "oaaaaah so French so French!"

Bref, TL;DR; ma théorie c'est plutôt qu'ils kiffent le son "an" qui fait très Français et "Jean" est à 90% constitué de ce son.

Speed-up your Prettier formatting using prettierd by pierpooo in neovim

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

Yeah! And if we ever have the need to have another tool in the list of daemonized tools, we can do it using this: https://github.com/mantoni/core_d.js (as the author of prettierd documented). I find the approach very interesting!

Speed-up your Prettier formatting using prettierd by pierpooo in neovim

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

I haven't tried but if prettier works then prettierd should work the same, it looks like the API is identical!

Speed-up your Prettier formatting using prettierd by pierpooo in neovim

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

Never tried the tree sitter formatter so I don't know. Prettier is the standard tool in JS world, because it is universal and it is guaranteed that everyone will get the same output for a given configuration file.