Skip to content
This repository has been archived by the owner on May 7, 2019. It is now read-only.

Suggestions for lower end mobile devices. ? #8

Open
darkyen opened this issue Jul 8, 2015 · 6 comments
Open

Suggestions for lower end mobile devices. ? #8

darkyen opened this issue Jul 8, 2015 · 6 comments

Comments

@darkyen
Copy link

darkyen commented Jul 8, 2015

  1. Can we lazy render the tabs somehow ? maybe by adding an addtional async parameter that tells the view to only render the content once the view has been first viewed this will save performance.
  2. Maybe use native snap scroll implementations when available
    for instance :http://dev.w3.org/csswg/css-snappoints/ Allows snapping of points natively in the scrollview, and saves performance on extremely low powered devices. *(Currently only supported by Microsoft devices)
@CaptainN
Copy link
Collaborator

A big performance issue I see is that it triggers a full React diff and render cycle each frame while dragging, which is heavy for that kind of animation. I think it should probably only do full diffing for big state changes, and drag events should be handled at the DOM level outside of React.

I'd be happy to submit a patch if you like.

@damusnet
Copy link
Owner

Hi @CaptainN and thanks for weighing in.
Unfortunately, I lack the time to maintain this library.
However, I will do my best to review any pull request you shall submit.

@CaptainN
Copy link
Collaborator

Sounds good. I have a few other ideas, such as correct throw physics for drag/drop paging.

I'm actively using this for a project, so I'll probably do a few other mods (including the React.Children PR I just submitted).

@damusnet
Copy link
Owner

Nice! I just added you as a collaborator.
However I'll still have to publish to npm myself for now.
Not sure how to share or transfer ownership there yet.

As you'll see, the build process and examples are quite cumbersome to maintain.
Also, introducing react-router in the lib itself was a mistake in my opinion.
I figured I'd take the time to get rid of react-router, upgrade react version, and cut a major version release as soon as I'd find the time. Feel free to make the project evolve as you see fit.

@darkyen
Copy link
Author

darkyen commented Apr 13, 2016

@CaptainN you should check out swiper.js it performs really well on lower end mobile devices (Tested on Lumia 520).

I use it here https://github.com/darkyen/react-ui-components/blob/master/src/UITabsView.js along with more high performance react components.

@CaptainN
Copy link
Collaborator

@darkyen Swiper.js looks pretty sweet. I'll probably clean up what I can here, and then look at that a bit more closely.

@damusnet I'll see about fixing up the issues I see (there seems to be some bugs with the current version of iOS for example), and I'll take a look at the router integration.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants