Redirect with useNavigate Hook - React Tutorial 24

  Рет қаралды 12,257

Caleb Curry

Caleb Curry

Күн бұрын

Пікірлер: 12
@codebreakthrough
@codebreakthrough 2 жыл бұрын
⚛ FREE React Course (download & bonus content) - calcur.tech/free-react-course React KZbin Playlist - calcur.tech/react-playlist Code - github.com/CalebCurry/react
@victorloua9587
@victorloua9587 2 жыл бұрын
Thanks for sharing this. It was quite helpful I like the way you use the tricks.
@themindhelp9584
@themindhelp9584 Жыл бұрын
0:59 :))))))))))) hahahahaaaaaaaa thaaat was realllllllyyyyyy good!!!
@getoverhere4465
@getoverhere4465 7 ай бұрын
I'm using useNavigate exactly how you are and I'm getting an error "Error: useNavigate() may be used only in the context of a "
@yusiff
@yusiff 2 жыл бұрын
pure gem
@adamdcunha5074
@adamdcunha5074 2 жыл бұрын
Where can i find the back end http request made
@codebreakthrough
@codebreakthrough 2 жыл бұрын
first
@douggale5962
@douggale5962 2 жыл бұрын
Not plus word!!!!!! encodeURIComponent! What if "word" is equal to "hahaha/there/are/slashes?lmfao=1"
@codebreakthrough
@codebreakthrough 2 жыл бұрын
Yea please feel free to elaborate… I understand the problem as this would bring the user to an undefined page resulting in a 404. But also no actual words are going to look like that, so should you expect much else than a “broken” page when a user submits bogus data on purpose? What do you think should be the expected behavior for a user? It may be something I can append to the end of this series
@douggale5962
@douggale5962 2 жыл бұрын
@@codebreakthrough If you are going to put an arbitrary string into a URL, particularly when it is arbitrary input from the user, you must encode the value using encodeURIComponent, which will escape things like spaces, /. +, ?, and several other things that will confuse a URL parser. The URL will be decoded for you in routing, so you will get the decoded value back when you read the placeholder, safely carrying the problematic characters. it should be navigate('/definition/' + encodeURIComponent(word)); I expect my ridiculous example from the previous comment to look up the definition of that word containing slashes and question mark and stuff. What I don't expect is a bobby-tables-like URL separator injection vulnerability. I hope you consider this criticism constructive. I think you are a really good teacher.
@meksha2383
@meksha2383 2 жыл бұрын
again...................yikes.
@codebreakthrough
@codebreakthrough 2 жыл бұрын
What?
Create 404 (Not Found) Page - React Tutorial 25
10:25
Caleb Curry
Рет қаралды 3,2 М.
Welcome to OpenGL
16:04
The Cherno
Рет қаралды 1,1 МЛН
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН
Redux - Complete Tutorial (with Redux Toolkit)
37:01
Cosden Solutions
Рет қаралды 269 М.
No BS Advice for Software Engineers
1:21:17
Caleb Curry
Рет қаралды 39 М.
10 React Hooks Explained // Plus Build your own from Scratch
13:15
Fireship
Рет қаралды 1,4 МЛН
React Router in Depth #10 - Forms & Actions
11:17
Net Ninja
Рет қаралды 36 М.
Learn React Hooks: useCallback - Simply Explained!
17:15
Cosden Solutions
Рет қаралды 116 М.
React JS Explained In 10 Minutes
10:00
Dennis Ivy
Рет қаралды 372 М.
Why Signals Are Better Than React Hooks
16:30
Web Dev Simplified
Рет қаралды 498 М.
Custom Hooks in React (Design Patterns)
12:56
Cosden Solutions
Рет қаралды 60 М.
Every React Concept Explained in 12 Minutes
11:53
Code Bootcamp
Рет қаралды 941 М.
Learn useRef in 11 Minutes
10:20
Web Dev Simplified
Рет қаралды 659 М.