Most performant way to transform/move large number of DOM elements












7














I built up a tree table structure for AngularJS (with Angular Material) some time ago.



My target was to make it work on large screens only (1280 and higher) but right now I want to update it and make it work on smaller devices (mostly tablets) without limiting data. Because of performance, I want to keep HTML as simple as possible (tree table can have 1000+ rows so creating more complicated HTML for the single row will elongate the time needed to append and render table row (rows are dynamic so it's not only about initial rendering)).



I came up with idea that I will keep "fixed" part with the first cell which contains a name and scroll second part which contains all metrics and will be scrolled synchronically.



Current HTML of single row:



<div class="tb-header layout-row">
<div class="tb-title"><span>Name</span></div>
<div class="tb-metrics">
<div class="layout-row">
<div class="tb-cell flex-10">812</div>
<div class="tb-cell flex-7">621</div>
<div class="tb-cell flex-4">76.5</div>
<div class="tb-cell flex-7">289</div>
<div class="tb-cell flex-4">46.5</div>
<div class="tb-cell flex-7">308</div>
<div class="tb-cell flex-4">49.6</div>
<div class="tb-cell flex-7">390</div>
<div class="tb-cell flex-4">48.0</div>
<div class="tb-cell flex-7">190</div>
<div class="tb-cell flex-4">23.4</div>
<div class="tb-cell flex-7">0</div>
<div class="tb-cell flex-4">0.0</div>
<div class="tb-cell flex-8">6.4</div>
<div class="tb-cell flex-8">0.0</div>
<div class="tb-cell flex-8"></div>
</div>
</div>




My idea was to use touchmove event on parent container (wrapping whole tree and bind as directive) and check when touchmove starts over metrics section then calculate the value which I should move metrics. And that part works fine.
The problem starts when I want to apply the offset on the .tb-metrics >.



My first try was to use jQuery:



function moveMetrics( offset ) {
var ofx = offset < 0 ? (offset < -getMetricsScrollWidth() ? -getMetricsScrollWidth() : offset) : 0;
$('.tb-metrics').children().css('transform', 'translateX(' + ofx + 'px)');

/*...*/

}


Unfortunately, this solution is quite slow when the table contains more rows (I cannot cache rows because they are dynamic).



In my second attempt, a tried to avoid as much DOM manipulation as I can.
To achieve that I decided to add <script> tag to dom which contains css which applies to .metrics > .layout-row.



Solution:



function moveMetrics( offset ) {
var ofx = offset < 0 ? (offset < -getMetricsScrollWidth() ? -getMetricsScrollWidth() : offset) : 0
, style = $( '#tbMetricsVirtualScroll' )
;

if ( !style.length ) {
body.append( '<style id="tbMetricsVirtualScroll">.tb-metrics > * {transform: translateX(' + ofx + 'px)}</style>' );
style = $( '#tbMetricsVirtualScroll' );
} else {
style.text( '.tb-metrics > * {transform: translateX(' + ofx + 'px)}' );
}
/*...*/
}


However, it doesn't seem to be much faster when the table contains a large number of rows. So it's not DOM manipulation but rendering/painting view seems to be the bottleneck here.



I tried to create some kind of virtual scroll but because tree structure is different for different sets of data and can have "infinite" number of levels (each row can contain children rows in new ng-repeat) it's a really hard task.



I will appreciate any ideas about how I can improve performance in that situation without using the virtual scroll.



EDIT:



Screenshot of Chrome timeline shows that most time of scrolling is consumed by rendering (I guess that it is because of complicated DOM structure)



enter image description here



EDIT 2:



I won't say that I achieved absolutely smooth scrolling, but I found a couple of things for significant performance improvement (some of them weren't obvious and the result is better than I expected after such small changes).




  • Simplify class selectors :
    .tb-header > .tb-metrics > .tb-cell is much slower than .tb-specific-cell (it seems that it take more time to parse more complicated selectors?)

  • remove opacity and box shadows from transformed elements

  • try to distribute transformed element to new layer (use css will-change and/or translateZ(0))










share|improve this question




















  • 1




    I would suggest looking into virtual repeat github.com/stackfull/angular-virtual-scroll
    – koningdavid
    Mar 21 '16 at 10:57










  • you should use material design which is responsive and will automatically convert your large tables
    – Amit Sirohiya
    Mar 21 '16 at 11:00










  • @koningdavid I was trying to implement it, but the problem is that, I am using recurrent directive so every row can have it's own children rows (and another ng-repeat) so it makes it much more complicated
    – LJ Wadowski
    Mar 21 '16 at 11:02










  • One of the critical parts of smooth scrolling on mobile is to scroll the whole document instead of some distinct container with overflow: auto. It is hard to implement entirely smooth scrolling for a distinct container. Does it apply to your situation? Is whole document being scrolled or a distinct container?
    – Andrew Sklyarevsky
    Aug 19 '16 at 9:15










  • In that project I was scrolling whole body, however the ultimate solution I went for was to write complex virtual repeat plugin that handles tree like structure.
    – LJ Wadowski
    Aug 19 '16 at 9:31
















7














I built up a tree table structure for AngularJS (with Angular Material) some time ago.



My target was to make it work on large screens only (1280 and higher) but right now I want to update it and make it work on smaller devices (mostly tablets) without limiting data. Because of performance, I want to keep HTML as simple as possible (tree table can have 1000+ rows so creating more complicated HTML for the single row will elongate the time needed to append and render table row (rows are dynamic so it's not only about initial rendering)).



I came up with idea that I will keep "fixed" part with the first cell which contains a name and scroll second part which contains all metrics and will be scrolled synchronically.



Current HTML of single row:



<div class="tb-header layout-row">
<div class="tb-title"><span>Name</span></div>
<div class="tb-metrics">
<div class="layout-row">
<div class="tb-cell flex-10">812</div>
<div class="tb-cell flex-7">621</div>
<div class="tb-cell flex-4">76.5</div>
<div class="tb-cell flex-7">289</div>
<div class="tb-cell flex-4">46.5</div>
<div class="tb-cell flex-7">308</div>
<div class="tb-cell flex-4">49.6</div>
<div class="tb-cell flex-7">390</div>
<div class="tb-cell flex-4">48.0</div>
<div class="tb-cell flex-7">190</div>
<div class="tb-cell flex-4">23.4</div>
<div class="tb-cell flex-7">0</div>
<div class="tb-cell flex-4">0.0</div>
<div class="tb-cell flex-8">6.4</div>
<div class="tb-cell flex-8">0.0</div>
<div class="tb-cell flex-8"></div>
</div>
</div>




My idea was to use touchmove event on parent container (wrapping whole tree and bind as directive) and check when touchmove starts over metrics section then calculate the value which I should move metrics. And that part works fine.
The problem starts when I want to apply the offset on the .tb-metrics >.



My first try was to use jQuery:



function moveMetrics( offset ) {
var ofx = offset < 0 ? (offset < -getMetricsScrollWidth() ? -getMetricsScrollWidth() : offset) : 0;
$('.tb-metrics').children().css('transform', 'translateX(' + ofx + 'px)');

/*...*/

}


Unfortunately, this solution is quite slow when the table contains more rows (I cannot cache rows because they are dynamic).



In my second attempt, a tried to avoid as much DOM manipulation as I can.
To achieve that I decided to add <script> tag to dom which contains css which applies to .metrics > .layout-row.



Solution:



function moveMetrics( offset ) {
var ofx = offset < 0 ? (offset < -getMetricsScrollWidth() ? -getMetricsScrollWidth() : offset) : 0
, style = $( '#tbMetricsVirtualScroll' )
;

if ( !style.length ) {
body.append( '<style id="tbMetricsVirtualScroll">.tb-metrics > * {transform: translateX(' + ofx + 'px)}</style>' );
style = $( '#tbMetricsVirtualScroll' );
} else {
style.text( '.tb-metrics > * {transform: translateX(' + ofx + 'px)}' );
}
/*...*/
}


However, it doesn't seem to be much faster when the table contains a large number of rows. So it's not DOM manipulation but rendering/painting view seems to be the bottleneck here.



I tried to create some kind of virtual scroll but because tree structure is different for different sets of data and can have "infinite" number of levels (each row can contain children rows in new ng-repeat) it's a really hard task.



I will appreciate any ideas about how I can improve performance in that situation without using the virtual scroll.



EDIT:



Screenshot of Chrome timeline shows that most time of scrolling is consumed by rendering (I guess that it is because of complicated DOM structure)



enter image description here



EDIT 2:



I won't say that I achieved absolutely smooth scrolling, but I found a couple of things for significant performance improvement (some of them weren't obvious and the result is better than I expected after such small changes).




  • Simplify class selectors :
    .tb-header > .tb-metrics > .tb-cell is much slower than .tb-specific-cell (it seems that it take more time to parse more complicated selectors?)

  • remove opacity and box shadows from transformed elements

  • try to distribute transformed element to new layer (use css will-change and/or translateZ(0))










share|improve this question




















  • 1




    I would suggest looking into virtual repeat github.com/stackfull/angular-virtual-scroll
    – koningdavid
    Mar 21 '16 at 10:57










  • you should use material design which is responsive and will automatically convert your large tables
    – Amit Sirohiya
    Mar 21 '16 at 11:00










  • @koningdavid I was trying to implement it, but the problem is that, I am using recurrent directive so every row can have it's own children rows (and another ng-repeat) so it makes it much more complicated
    – LJ Wadowski
    Mar 21 '16 at 11:02










  • One of the critical parts of smooth scrolling on mobile is to scroll the whole document instead of some distinct container with overflow: auto. It is hard to implement entirely smooth scrolling for a distinct container. Does it apply to your situation? Is whole document being scrolled or a distinct container?
    – Andrew Sklyarevsky
    Aug 19 '16 at 9:15










  • In that project I was scrolling whole body, however the ultimate solution I went for was to write complex virtual repeat plugin that handles tree like structure.
    – LJ Wadowski
    Aug 19 '16 at 9:31














7












7








7







I built up a tree table structure for AngularJS (with Angular Material) some time ago.



My target was to make it work on large screens only (1280 and higher) but right now I want to update it and make it work on smaller devices (mostly tablets) without limiting data. Because of performance, I want to keep HTML as simple as possible (tree table can have 1000+ rows so creating more complicated HTML for the single row will elongate the time needed to append and render table row (rows are dynamic so it's not only about initial rendering)).



I came up with idea that I will keep "fixed" part with the first cell which contains a name and scroll second part which contains all metrics and will be scrolled synchronically.



Current HTML of single row:



<div class="tb-header layout-row">
<div class="tb-title"><span>Name</span></div>
<div class="tb-metrics">
<div class="layout-row">
<div class="tb-cell flex-10">812</div>
<div class="tb-cell flex-7">621</div>
<div class="tb-cell flex-4">76.5</div>
<div class="tb-cell flex-7">289</div>
<div class="tb-cell flex-4">46.5</div>
<div class="tb-cell flex-7">308</div>
<div class="tb-cell flex-4">49.6</div>
<div class="tb-cell flex-7">390</div>
<div class="tb-cell flex-4">48.0</div>
<div class="tb-cell flex-7">190</div>
<div class="tb-cell flex-4">23.4</div>
<div class="tb-cell flex-7">0</div>
<div class="tb-cell flex-4">0.0</div>
<div class="tb-cell flex-8">6.4</div>
<div class="tb-cell flex-8">0.0</div>
<div class="tb-cell flex-8"></div>
</div>
</div>




My idea was to use touchmove event on parent container (wrapping whole tree and bind as directive) and check when touchmove starts over metrics section then calculate the value which I should move metrics. And that part works fine.
The problem starts when I want to apply the offset on the .tb-metrics >.



My first try was to use jQuery:



function moveMetrics( offset ) {
var ofx = offset < 0 ? (offset < -getMetricsScrollWidth() ? -getMetricsScrollWidth() : offset) : 0;
$('.tb-metrics').children().css('transform', 'translateX(' + ofx + 'px)');

/*...*/

}


Unfortunately, this solution is quite slow when the table contains more rows (I cannot cache rows because they are dynamic).



In my second attempt, a tried to avoid as much DOM manipulation as I can.
To achieve that I decided to add <script> tag to dom which contains css which applies to .metrics > .layout-row.



Solution:



function moveMetrics( offset ) {
var ofx = offset < 0 ? (offset < -getMetricsScrollWidth() ? -getMetricsScrollWidth() : offset) : 0
, style = $( '#tbMetricsVirtualScroll' )
;

if ( !style.length ) {
body.append( '<style id="tbMetricsVirtualScroll">.tb-metrics > * {transform: translateX(' + ofx + 'px)}</style>' );
style = $( '#tbMetricsVirtualScroll' );
} else {
style.text( '.tb-metrics > * {transform: translateX(' + ofx + 'px)}' );
}
/*...*/
}


However, it doesn't seem to be much faster when the table contains a large number of rows. So it's not DOM manipulation but rendering/painting view seems to be the bottleneck here.



I tried to create some kind of virtual scroll but because tree structure is different for different sets of data and can have "infinite" number of levels (each row can contain children rows in new ng-repeat) it's a really hard task.



I will appreciate any ideas about how I can improve performance in that situation without using the virtual scroll.



EDIT:



Screenshot of Chrome timeline shows that most time of scrolling is consumed by rendering (I guess that it is because of complicated DOM structure)



enter image description here



EDIT 2:



I won't say that I achieved absolutely smooth scrolling, but I found a couple of things for significant performance improvement (some of them weren't obvious and the result is better than I expected after such small changes).




  • Simplify class selectors :
    .tb-header > .tb-metrics > .tb-cell is much slower than .tb-specific-cell (it seems that it take more time to parse more complicated selectors?)

  • remove opacity and box shadows from transformed elements

  • try to distribute transformed element to new layer (use css will-change and/or translateZ(0))










share|improve this question















I built up a tree table structure for AngularJS (with Angular Material) some time ago.



My target was to make it work on large screens only (1280 and higher) but right now I want to update it and make it work on smaller devices (mostly tablets) without limiting data. Because of performance, I want to keep HTML as simple as possible (tree table can have 1000+ rows so creating more complicated HTML for the single row will elongate the time needed to append and render table row (rows are dynamic so it's not only about initial rendering)).



I came up with idea that I will keep "fixed" part with the first cell which contains a name and scroll second part which contains all metrics and will be scrolled synchronically.



Current HTML of single row:



<div class="tb-header layout-row">
<div class="tb-title"><span>Name</span></div>
<div class="tb-metrics">
<div class="layout-row">
<div class="tb-cell flex-10">812</div>
<div class="tb-cell flex-7">621</div>
<div class="tb-cell flex-4">76.5</div>
<div class="tb-cell flex-7">289</div>
<div class="tb-cell flex-4">46.5</div>
<div class="tb-cell flex-7">308</div>
<div class="tb-cell flex-4">49.6</div>
<div class="tb-cell flex-7">390</div>
<div class="tb-cell flex-4">48.0</div>
<div class="tb-cell flex-7">190</div>
<div class="tb-cell flex-4">23.4</div>
<div class="tb-cell flex-7">0</div>
<div class="tb-cell flex-4">0.0</div>
<div class="tb-cell flex-8">6.4</div>
<div class="tb-cell flex-8">0.0</div>
<div class="tb-cell flex-8"></div>
</div>
</div>




My idea was to use touchmove event on parent container (wrapping whole tree and bind as directive) and check when touchmove starts over metrics section then calculate the value which I should move metrics. And that part works fine.
The problem starts when I want to apply the offset on the .tb-metrics >.



My first try was to use jQuery:



function moveMetrics( offset ) {
var ofx = offset < 0 ? (offset < -getMetricsScrollWidth() ? -getMetricsScrollWidth() : offset) : 0;
$('.tb-metrics').children().css('transform', 'translateX(' + ofx + 'px)');

/*...*/

}


Unfortunately, this solution is quite slow when the table contains more rows (I cannot cache rows because they are dynamic).



In my second attempt, a tried to avoid as much DOM manipulation as I can.
To achieve that I decided to add <script> tag to dom which contains css which applies to .metrics > .layout-row.



Solution:



function moveMetrics( offset ) {
var ofx = offset < 0 ? (offset < -getMetricsScrollWidth() ? -getMetricsScrollWidth() : offset) : 0
, style = $( '#tbMetricsVirtualScroll' )
;

if ( !style.length ) {
body.append( '<style id="tbMetricsVirtualScroll">.tb-metrics > * {transform: translateX(' + ofx + 'px)}</style>' );
style = $( '#tbMetricsVirtualScroll' );
} else {
style.text( '.tb-metrics > * {transform: translateX(' + ofx + 'px)}' );
}
/*...*/
}


However, it doesn't seem to be much faster when the table contains a large number of rows. So it's not DOM manipulation but rendering/painting view seems to be the bottleneck here.



I tried to create some kind of virtual scroll but because tree structure is different for different sets of data and can have "infinite" number of levels (each row can contain children rows in new ng-repeat) it's a really hard task.



I will appreciate any ideas about how I can improve performance in that situation without using the virtual scroll.



EDIT:



Screenshot of Chrome timeline shows that most time of scrolling is consumed by rendering (I guess that it is because of complicated DOM structure)



enter image description here



EDIT 2:



I won't say that I achieved absolutely smooth scrolling, but I found a couple of things for significant performance improvement (some of them weren't obvious and the result is better than I expected after such small changes).




  • Simplify class selectors :
    .tb-header > .tb-metrics > .tb-cell is much slower than .tb-specific-cell (it seems that it take more time to parse more complicated selectors?)

  • remove opacity and box shadows from transformed elements

  • try to distribute transformed element to new layer (use css will-change and/or translateZ(0))







javascript jquery html css angularjs






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 days ago









priyanshi srivastava

592316




592316










asked Mar 21 '16 at 10:54









LJ Wadowski

2,62542253




2,62542253








  • 1




    I would suggest looking into virtual repeat github.com/stackfull/angular-virtual-scroll
    – koningdavid
    Mar 21 '16 at 10:57










  • you should use material design which is responsive and will automatically convert your large tables
    – Amit Sirohiya
    Mar 21 '16 at 11:00










  • @koningdavid I was trying to implement it, but the problem is that, I am using recurrent directive so every row can have it's own children rows (and another ng-repeat) so it makes it much more complicated
    – LJ Wadowski
    Mar 21 '16 at 11:02










  • One of the critical parts of smooth scrolling on mobile is to scroll the whole document instead of some distinct container with overflow: auto. It is hard to implement entirely smooth scrolling for a distinct container. Does it apply to your situation? Is whole document being scrolled or a distinct container?
    – Andrew Sklyarevsky
    Aug 19 '16 at 9:15










  • In that project I was scrolling whole body, however the ultimate solution I went for was to write complex virtual repeat plugin that handles tree like structure.
    – LJ Wadowski
    Aug 19 '16 at 9:31














  • 1




    I would suggest looking into virtual repeat github.com/stackfull/angular-virtual-scroll
    – koningdavid
    Mar 21 '16 at 10:57










  • you should use material design which is responsive and will automatically convert your large tables
    – Amit Sirohiya
    Mar 21 '16 at 11:00










  • @koningdavid I was trying to implement it, but the problem is that, I am using recurrent directive so every row can have it's own children rows (and another ng-repeat) so it makes it much more complicated
    – LJ Wadowski
    Mar 21 '16 at 11:02










  • One of the critical parts of smooth scrolling on mobile is to scroll the whole document instead of some distinct container with overflow: auto. It is hard to implement entirely smooth scrolling for a distinct container. Does it apply to your situation? Is whole document being scrolled or a distinct container?
    – Andrew Sklyarevsky
    Aug 19 '16 at 9:15










  • In that project I was scrolling whole body, however the ultimate solution I went for was to write complex virtual repeat plugin that handles tree like structure.
    – LJ Wadowski
    Aug 19 '16 at 9:31








1




1




I would suggest looking into virtual repeat github.com/stackfull/angular-virtual-scroll
– koningdavid
Mar 21 '16 at 10:57




I would suggest looking into virtual repeat github.com/stackfull/angular-virtual-scroll
– koningdavid
Mar 21 '16 at 10:57












you should use material design which is responsive and will automatically convert your large tables
– Amit Sirohiya
Mar 21 '16 at 11:00




you should use material design which is responsive and will automatically convert your large tables
– Amit Sirohiya
Mar 21 '16 at 11:00












@koningdavid I was trying to implement it, but the problem is that, I am using recurrent directive so every row can have it's own children rows (and another ng-repeat) so it makes it much more complicated
– LJ Wadowski
Mar 21 '16 at 11:02




@koningdavid I was trying to implement it, but the problem is that, I am using recurrent directive so every row can have it's own children rows (and another ng-repeat) so it makes it much more complicated
– LJ Wadowski
Mar 21 '16 at 11:02












One of the critical parts of smooth scrolling on mobile is to scroll the whole document instead of some distinct container with overflow: auto. It is hard to implement entirely smooth scrolling for a distinct container. Does it apply to your situation? Is whole document being scrolled or a distinct container?
– Andrew Sklyarevsky
Aug 19 '16 at 9:15




One of the critical parts of smooth scrolling on mobile is to scroll the whole document instead of some distinct container with overflow: auto. It is hard to implement entirely smooth scrolling for a distinct container. Does it apply to your situation? Is whole document being scrolled or a distinct container?
– Andrew Sklyarevsky
Aug 19 '16 at 9:15












In that project I was scrolling whole body, however the ultimate solution I went for was to write complex virtual repeat plugin that handles tree like structure.
– LJ Wadowski
Aug 19 '16 at 9:31




In that project I was scrolling whole body, however the ultimate solution I went for was to write complex virtual repeat plugin that handles tree like structure.
– LJ Wadowski
Aug 19 '16 at 9:31

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f36129133%2fmost-performant-way-to-transform-move-large-number-of-dom-elements%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f36129133%2fmost-performant-way-to-transform-move-large-number-of-dom-elements%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

generate and download xml file after input submit (php and mysql) - JPK

Angular Downloading a file using contenturl with Basic Authentication

Can't read property showImagePicker of undefined in react native iOS