Тёмный

How React Hooks can replace React Router 

LogRocket
Подписаться 12 тыс.
Просмотров 12 тыс.
50% 1

Looking to learn more about hookrouter and how it works? Follow along with this tutorial to learn more.
Introduction -- 00:00
Project creation with create-react-app -- 02:02
Critical step to remove React.StrictMode (otherwise hookrouter does not work) -- 04:10
Install hookrouter dependency -- 04:30
Creating our helper components and Navbar -- 06:32
Rending routes with the useRoutes hook -- 12:54
Create the Home, About, Contact, Not Found pages -- 15:21
Basic demo of the routes working -- 17:39
Setting up advanced routing of child routes on About page -- 18:05
Creating components for child routes -- 19:10
Finalize advanced routing of child routes -- 21:39
Creating links for use with route params -- 23:27
Utilize route params on the contact page to conditionally render content -- 26:58
Demo of the final product -- 28:24
Try LogRocket for free: logrocket.com/?yt46
LogRocket is a frontend application monitoring solution that lets you replay problems as if they happened in your own browser. Instead of guessing why errors happen, or asking users for screenshots and log dumps, LogRocket lets you replay the session to quickly understand what went wrong. It works perfectly with any app, regardless of framework, and has plugins to log additional context from Redux, Vuex, and @ngrx/store.
In addition to logging Redux actions and state, LogRocket records console logs, JavaScript errors, stacktraces, network requests/responses with headers + bodies, browser metadata, and custom logs. It also instruments the DOM to record the HTML and CSS on the page, recreating pixel-perfect videos of even the most complex single-page apps.
Try it for free: logrocket.com/signup/

Наука

Опубликовано:

 

31 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 9   
@AcTheMace
@AcTheMace 3 года назад
Hey thanks SO much for this tutorial. It's the only one I found on HookRouter and you really explained and showed everything I feel like I need to know to use this in my project. Thank you!!
@subinpauljoy
@subinpauljoy 2 года назад
Are you able to pass on props from parent to child? if so, please help
@ennissg
@ennissg 4 года назад
Thank you !! Now I start using Hook Router. That is much simpler and cleaner.
@front-endanimal6359
@front-endanimal6359 4 года назад
I very love react framework!
@macximu15
@macximu15 3 года назад
Obrigado, me salvou.
@argemable
@argemable 4 года назад
Great tutorial! Hey Brice. That's a sweet terminal AND a sweet theme / syntax highlighting for VS Code. Would you mind me asking how to set it up ? Thanks :)
@zacchen7290
@zacchen7290 4 года назад
quick question, how do you assign such functionality to a custom component(div, button)? the documentation in git was not clear on how those are implemented
@subinpauljoy
@subinpauljoy 2 года назад
Actually I created a parent and two child components. one child component will collect user data from /input rute and pass its state to app(parent) component. everything works fine till there. i have second component /overview to show the user input data. Unfortunately when go to /overview, the app state gets cleared. Im pretty new to react can anybody help me with this?
@arch7143
@arch7143 4 года назад
GitHub repo would be coolaa
Далее
Use React + Context, not React + Redux
21:33
Просмотров 33 тыс.
9 React conditional rendering methods
23:45
Просмотров 10 тыс.
React Native Tab Bar Routing with Expo Router
11:29
Просмотров 65 тыс.
The Story of Next.js
12:13
Просмотров 558 тыс.
Context API in react | get the concept
29:00
Просмотров 48 тыс.
Learn React Router v6 - Full Course
1:43:23
Просмотров 48 тыс.
Understanding how the useRef Hook works in React
23:51
The new React Router
11:30
Просмотров 1,7 тыс.