Secret React-Native Hack For React Web Devs!

  Рет қаралды 13,728

Jack Herrington

Jack Herrington

Күн бұрын

Пікірлер: 41
@jherr
@jherr 3 ай бұрын
My apologies to the pnpm faithful (myself included). The `patch-package` module didn't work for me, but that does not mean that you can't patch with pnpm. Pnpm has native functionality for patching, as does yarn, with the `pnpm patch` or `yarn patch` commands. Though these commands vary in their options and use.
@florentklein42
@florentklein42 3 ай бұрын
This DOES work with pnpm. Actually, pnpm supports this feature natively: pnpm patch
@gersom3318
@gersom3318 3 ай бұрын
My first thought was, huh why didn't Jack know until recently about patching packages and then my second thought was exactly what you are pointing out. I use this at least once in every project, using pnpm natively. I hope he adds a little floating note to the video pointing out his mistake. Also spent way too much time on this video because of its non-descriptive title. Should've scrubbed.
@mikopiko
@mikopiko 3 ай бұрын
Pnpm patch seem to be a better alternative
@jherr
@jherr 3 ай бұрын
Thanks for the clarification. This was an honest mistake. I tried patch-package with pnpm and it didn't work, but I didn't go looking for the native patch functionality within pnpm. I'll add some text to the video and an expository comment.
@aexalven
@aexalven 3 ай бұрын
Got excited for a second for RN content, but turns out its SSR content, sadge ;_;
@jherr
@jherr 3 ай бұрын
Infinite Red is the sponsor of this weeks video. Infinite Red is an React-Native consultancy. They have been in the React-Native community from the start. And they have built amazing framework like Ignite and MLKit to support React-Native devs. If you are looking for some help with your React-Native application, give them a look! You'll get a great consultancy and you'll help this channel! infinite.red/
@irjamon
@irjamon 3 ай бұрын
💜 Thanks Jack, you're the best. Great vid too! patch-package is an essential tool IMO
@johnpagley
@johnpagley 2 ай бұрын
Good stuff! We heavily use RN.
@aham_sammich
@aham_sammich 3 ай бұрын
Nice! I've had to do this a couple times in the past. Very useful!
@van_valdis
@van_valdis 3 ай бұрын
The irony of installing yet another package to fix a broken package
@HBMoulvad
@HBMoulvad 3 ай бұрын
Remembering this. I wanted to use KY with React Native project I was working on. I didn't work out of the box, used "patch-package" to fix what caused the issue.
@simonreggiani
@simonreggiani 2 ай бұрын
I'm a RN dev. I always thought this was a JS/React ecosystem thing, not just RN 🤯
@jherr
@jherr 2 ай бұрын
It's more of an ecosystem thing, but I've only seen folks use it in RN-land.
@hakuna_matata_hakuna
@hakuna_matata_hakuna 3 ай бұрын
try doing that with minified code
@tthiagolino8
@tthiagolino8 3 ай бұрын
Instead of using a dedicated library to do patches you can use the existing patching functionality in all package managers (except npm) E.g. bun patch bad-library
@mikopiko
@mikopiko 3 ай бұрын
Someone else pointed out that pnpm already has that feature
@geekySRM
@geekySRM 3 ай бұрын
Wow this is great
@tofful
@tofful 3 ай бұрын
@jherr Hi Jack, could you please share your custom oh-my-posh json? it looks fantastic. Thank you
@epshtielsl
@epshtielsl 3 ай бұрын
As someone who is primarily a RN dev, why would there be hesitation in using patch-package from those in React-land?
@_y7ya
@_y7ya 3 ай бұрын
Because if a package needs patching that's usually an indication that it shouldn't be used in the first place. If you ever run into a situation where you feel you need to patch a package, there's almost always a better up-to-date package or DIY solution. If you do decide to patch a package you increase the maintenance overhead for every package you patch. I don't know why patching is a standard part of the dev flow for react native devs, my best assumption is that react native is fragile relative to react so it can take more tinkering to get things working across devices and systems.
@epshtielsl
@epshtielsl 3 ай бұрын
@@_y7ya That makes sense, thanks. Yeah there are a lot of moving pieces with changes on the iOS and Android sides that a particular package may not have kept up with resulting in it not working for certain versions of React Native leading devs to utilize patches to get their apps running until updates are released.
@piotroszko2
@piotroszko2 3 ай бұрын
@@_y7ya I am also an RN developer. patch-package is usually used for legacy projects. A year ago in the company I got a project on a very old version of RN. 1/4 of the packages had not been updated for a while, and since there was no budget to rewrite those funkconalities we patch-packaged those packages to run on the latest RN. It is not a beautiful solution, but for large projects it is a savior.
@monarchgam3r
@monarchgam3r 3 ай бұрын
Great stuff… but how did u get those icons in your terminal, especially the react one ? Never seen that before
@zlackbiro
@zlackbiro 3 ай бұрын
Its some MAC bullshit thing. You cant get this on windows because windows terminals sucks. You will spend hours to make one work.
@gnrsn9714
@gnrsn9714 3 ай бұрын
Not a react native dev but I’ve used patch package a brunch for tooling that doesnt behave well in our monorepo at work. I understand click bait titles are a part of getting reach on KZbin but nothing secret about me and got a bit annoyed at the scrubbing it took to find out what this was about.
@AleksanderGjinollari
@AleksanderGjinollari 3 ай бұрын
This video comes after I thought of creating a mobile App (I'm a frontend dev), and researched React Native yesterday. Is it fate?
@gerkim62
@gerkim62 3 ай бұрын
what if you npm update a patched package
@epshtielsl
@epshtielsl 3 ай бұрын
It will show a warning message and attempt to apply the changes in the patch file. If the patch file is no longer applicable due to changes in the source file, it will error.
@JohnPywtorak
@JohnPywtorak 12 күн бұрын
I thought you were a real person, then you said “timeplate”? Now I, questioning everything.
@jherr
@jherr 12 күн бұрын
Timeplate? When did I say that? Just curious honestly. FWIW, I share your concern, I was watching a video a couple of days ago where the person clearly pronounced the right word the wrong way. And I realized that I was listening to an AI voice. And I'm not honestly sure how I feel about that anymore. Maybe that's ok? I dunno. That being said, I'm very much human. And very much have a "Philly" accent, so I tend to slur and mispronounce stuff. It happens.
@JohnPywtorak
@JohnPywtorak 12 күн бұрын
@@jherr thanks you’ll find it at 3:02
@greendsnow
@greendsnow 3 ай бұрын
Even the low end phones have 8GB RAM. I use Capacitor, let user's mobile browser handle that thing. Also I'm done with styling RN components. I don't like the ecosystem at all.
@karolbielen2090
@karolbielen2090 3 ай бұрын
ekhm... this comment seems to off tthe topic...
@dagonzalez1757
@dagonzalez1757 3 ай бұрын
Audio is kinda out of sync
@kristianulvund4274
@kristianulvund4274 3 ай бұрын
It's not secret anymore🥴
@sarcasticdna
@sarcasticdna 3 ай бұрын
L video
@_y7ya
@_y7ya 3 ай бұрын
Agreed. Patching a package for SSR purposes is such a terrible use case.
Vites Fatal Flaw Fixed With Vinxi
11:23
Jack Herrington
Рет қаралды 17 М.
I HACKED ShadCN to Create Insane React Templates and Installers
14:59
Jack Herrington
Рет қаралды 22 М.
ТЮРЕМЩИК В БОКСЕ! #shorts
00:58
HARD_MMA
Рет қаралды 2,6 МЛН
Thank you Santa
00:13
Nadir Show
Рет қаралды 29 МЛН
Players vs Pitch 🤯
00:26
LE FOOT EN VIDÉO
Рет қаралды 136 МЛН
From React to React Native in 12 Minutes
12:33
Simon Grimm
Рет қаралды 24 М.
useCallback vs. useMemo
11:19
Jan Hesters
Рет қаралды 4,3 М.
ShadCN’s Revolutionary New CLI
12:11
Jack Herrington
Рет қаралды 56 М.
10 Essential React Native Tips Every Developer Must Know
12:07
Simon Grimm
Рет қаралды 16 М.
Tanstack Start vs NextJS - Server Functions Battle
16:02
Jack Herrington
Рет қаралды 17 М.
Why I don't use React-Query and tRPC in Next.js
18:58
ByteGrad
Рет қаралды 97 М.
React Native Just Got 550% Faster
34:39
Theo - t3․gg
Рет қаралды 119 М.
5 Hidden React Server Function TRAPS Beginners Fall Into
21:31
Jack Herrington
Рет қаралды 10 М.