git config --global core.autocrlf false
git config --global core.eol lf
git add --update --renormalize
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers\PalmBunches\ReaTicket; | |
use App\Enums\Permission\PalmBunch as PermissionPalmBunch; | |
use App\Helper; | |
use App\Http\Controllers\Controller; | |
use App\Models\PalmBunch; | |
use App\Models\PalmBunchDeliveryRate; | |
use App\Models\PalmBunchesReaTicket; |
pada next js, lebih baik membuat sub komponen di dalam komponen atau diluar/sejajar dengan komponen? berikan juga contoh kodenya
Ketika bekerja dengan Next.js atau bahkan dengan React secara umum, ada beberapa pendekatan untuk menyusun sub komponen. Baik membuat sub komponen di dalam komponen utama atau membuatnya di luar atau sejajar dengan komponen utama memiliki kelebihan dan kekurangan masing-masing.
1. Membuat sub komponen di dalam komponen utama:
Dalam pendekatan ini, sub komponen didefinisikan di dalam file komponen utama. Ini cocok untuk sub komponen yang sangat spesifik dan tidak akan digunakan di tempat lain. Pendekatan ini bisa lebih rapi dan sederhana dalam kasus-kasus tertentu.
Contoh kode: