CakePHP 4 - InertiaJS and React using the cakephp-inertiajs adaptor by Ishan Vyas

Опубликовано: 30 Март 2023
на канале: James McDonald
734
16

Covers installing and activating the cakephp-inertiajs plugin, upgrading to React 18 and Inertiajs 1.0.2 and overcoming challenges along the way.''

Please note that you DO NOT need @inertiajs/inertia in your package.json. All you need is @inertiajs/react and it will pull in all the needed dependencies.

Code: https://github.com/toggenation/cakeph...

Timings
00:00 Intro
01:00 Install CakePHP
02:00 Installing & enabling the cakephp-inertiajs adaptor
05:00 Generate react scaffolding using bin/cake
06:30 Updating the default CakePHP 4 layout for Inertia
08:40 Add InertiaResponseTrait to AppController
09:40 Compiling assets
11:16 The Inertia root div
11:30 Adding our first react component
12:30 Creating an "Items" controller
14:10 Add an Items/Index.js component
15:05 Adding Layout.js using Interiajs.com documentation
16:55 Updating React and InertiaJS packages
30:35 Add a redirect action and InertiaJS Flash Message
32:40 Remove the Interia progress indicator
34:15 Install boostrap 5.x and include in app.js
35:24 Root template override
39:50 Refactor Layout.js to two column
47:00 Render the Items/Index.js component from another action
51:25 Display $items prop from CakePHP in Items/Index Component
52:52 Add a button and perform a get request by-passing Inertia.
1:06:50 Turn off the Inertia Progress indicator component


Смотрите видео CakePHP 4 - InertiaJS and React using the cakephp-inertiajs adaptor by Ishan Vyas онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь James McDonald 30 Март 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 734 раз и оно понравилось 16 людям.