• weather_picBakı ° C
  • m/s
currency_pic
    Haqqimizda
    • Azərbaycanca
    • Русский
    • English
    logo
        Report İnformasiya AgentliyiReport İnformasiya Agentliyi
        • Vakansiyalar
        • Haqqımızda
        • Bizimlə əlaqə
        • Abunə
        • Siyasət
        • İqtisadiyyat
        • COP29
        • Cəmiyyət
        • İdman
        • Mədəniyyət
        • Dünya
        • Analitika
        • Multimedia

        Saytdakı materialların istifadəsi zamanı istinad edilməsi vacibdir. Məlumat internet səhifələrində istifadə edildikdə hiperlink vasitəsi ilə istinad mütləqdir.

        "Report"müstəqil informasiya agentliyi sayt və gündəlik bülletenlər vasitəsi ilə Azərbaycan, rus və ingilis dillərində siyasət, iqtisadiyyat, cəmiyyət, idman, mədəniyyət sahələri üzrə ölkədə və dünyada baş verən ən vacib hadisələri öz oxucularına operativ şəkildə çatdırır. O cümlədən, saytın “Analitika” bölməsində Azərbaycanda və dünyada gedən proseslərlə bağlı analitik materiallar təqdim edilir.

        How to Optimize Your React App With Loadable Components

        Multimedia
        23 İyul, 202410:45
        How to Optimize Your React App With Loadable Components

        A good developer is always keen to find, learn and adapt new ways to optimize the app that he/she is working on. ‘Loadable Components’ is such a package that helps you to optimize your react app in numerous ways.

        Let’s find out about its features.

        Component Splitting

        This feature allows you to load the components separately that are not necessary to load during the initial load. So that it will help to reduce the initial loading time.

        It’s not mandatory to provide a fallback UI with this even though it’s something good to have for a better user experience.

        According to the above code, when the user clicks on the button, ComponentA will get rendered into the DOM.

        The below screenshot was taken during the test that I did without using loadable-components (Which means I have uncommented line 3 from the above code and commented lines 4 and 5.)

        In that scenario, ComponentA is also in bundle.jstogether with all other codes. That means the app has used its resources to load ComponentA during the initial rendering of the app, which is not necessary as ComponentA is something that we need only after we click the button to render it. Hence the initial loading time is recorded as 66ms.

        The below screenshot was taken during the test that I did while using loadable-components. (Which means I used the previous code exactly as it is). This time the componentA has got loaded as a separate component (srcComponentsCom…). So that it has not bothered the initial rendering. Hence the initial loading time of bundle.js has been reduced to 63ms. The size of bundle.js has increased because we had to import loadable-components package (line 4) to make things work.

        Bizim WhatsApp kanalımıza abunə olun

        Son xəbərlər

        15:51
        Shrek 5Dünya
        13:20
        Bakının dəniziCOP29
        10:45
        How to Optimize Your React App With Loadable ComponentsMultimedia
        13:36
        Asus NoteBook-ları ucuzlaşırİqtisadiyyat
        08:23
        Bitcoin qalxirİqtisadiyyat
        05:24
        Premyer Liqa: Bu gün "Neftçi" - "Qarabağ" oyunu baş tutacaqİdman
        12:50
        Prezident: 10 ilə bərpaolunan enerjidən maksimum istifadə edib, daxili bazarda təbii qaz istehlakını azaltmağı planlaşdırırıqİqtisadiyyat
        10:53
        “Qarabağ”ın “Bayer 04”lə ev oyununa 27000 bilet satılıbİdman
        06:55
        Azərbaycanda əsgərlərə 20 günlük məzuniyyətin verilməsi təklif edilirSiyasət
        05:44
        Erlinq Holann 54 ildən sonra Corc Bestin rekordunu təkrarlayıbİdman
        07:33
        “Mastercard” və “CinemaPlus” strateji tərəfdaş olub: “CineMastercard” təqdim edilirMədəniyyət
        05:21
        Azərbaycan Mərkəzi Bankının valyuta məzənnələri (27.02.2024)İqtisadiyyat
        05:59
        Oğuzda yollar buz bağlayıb, nəqliyyatın hərəkəti çətinləşibCəmiyyət
        05:35
        "Qarabağ"ın rəqibi rekorda imza atıbİdman
        04:48
        “Nova-C” Aya enib: 50 illik fasilədən sonra ABŞ-nin peykə ilk enişi gerçəkləşdirilibCəmiyyət
        04:23
        Bakıda 8 istiqamətdə tıxac yaranıb - SİYAHIİqtisadiyyat
        20:22
        “Qarabağ” tarixində ilk dəfə avrokubokların 1/8 finalına yüksəlibİdman
        17:53
        Avropa Liqası: "Qarabağ" "Braqa" ilə səfər oyununda inamlı qələbə qazanıbİdman
        17:43
        Rusiya Donetskin kəndini atəşə tutub, ölən və yaralananlar varDünya
        17:40
        Fuad Nəcəfli NDU-da həyata keçiriləcək layihələrdən danışıbCəmiyyət
        Bütün xəbər lenti