Преглед изворни кода

add logs to understand rendering timing easily

kaori пре 5 година
родитељ
комит
3eeb9aba53
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      src/client/js/components/CustomNavigation.jsx

+ 3 - 0
src/client/js/components/CustomNavigation.jsx

@@ -53,6 +53,7 @@ const CustomNavigation = (props) => {
 
       setSliderWidth(width);
       setSliderMarginLeft(marginLeft);
+      console.log(`sliderWidth = ${sliderWidth}`);
     }
     else {
       // Mount時の処理
@@ -67,9 +68,11 @@ const CustomNavigation = (props) => {
 
   function renderNavSlideHr() {
     if (defaultActiveTab === activeTab) {
+      console.log('1st');
       console.log(`defaultActiveTab = ${defaultActiveTab}`);
       return;
     }
+    console.log('2nd');
     return <hr className="my-0 grw-nav-slide-hr border-none" style={{ width: `${sliderWidth}%`, marginLeft: `${sliderMarginLeft}%` }} />;
   }