Nativebase: Migration and theming docs are a little bit confusing

Created on 22 Feb 2017  路  5Comments  路  Source: GeekyAnts/NativeBase

I have been playing with NativeBase 2.0.x a little and noticed a number of issues with the docs. There's a few similar issues here (#451, #497, #538) but this is about the specific issues I've stumbled upon.

The migration guide is outdated when it comes to porting over themes. It mentions variables.js that doesn't exist anymore. Docs on theming seem to be better, but are a quite confusing anyway, for example:

  • Running node node_modules/native-base/ejectTheme.js results in output that says:

    Head over to the docs(http://docs.nativebase.io/docs/customize/) for detailed information on customization

    That link leads to some old (?) docs for v0.5.22

  • Docs fail to explain what commonColor.js, material.js and platform.js are. I assume these are themes themselves. It would be good to explain that the platform.js is the equivalent of what variables.js used to be (assuming by this comment by @sanketsahusoft).

  • Docs seem to be using a reference to variable.js, i.e.:

    Go to Themes/variable.js and modify color code for textColor.

    This, again, is a tad confusing, particularly when the themes folder is called native-base-theme and themes sit in a /variables/ subfolder of it.

  • Related to the previous point, docs says: import material from './native-base-theme/material'; which I believe should be import material from './native-base-theme/variables/material';.

  • Docs doesn't explain what a variable really is, what a theme is, what the structure of the generated native-base-theme folder should look like, etc.

The latest (2.0.8) approach on theming seems to be a little different form how it worked with 2.0.0 so I understand this is still a work in progress but I hope the above helps nevertheless.

need doc

Most helpful comment

@andreyluiz nice keyword "ejectTheme.js". U saved my life. Many thks

All 5 comments

Hi, thanks for pointing out. We're woking to make the docs better. Your PR definitely helps!

@designorant Thanks a lot for pointing out the number of issues with the docs.

We are going to work thoroughly on the docs. The success of any Open Source project lies in good documentation.

I have issues with theming too. I tried to set the theme pointing to a copy of material.js, but this does not seems to work. Which file do I use to properly set the theme in 2.0.x?

EDIT: Never mind. I found the ejectTheme.js. It's okay now.

@andreyluiz nice keyword "ejectTheme.js". U saved my life. Many thks

The new docs which is now in GitBook is much improved and resolves most of these issue and confusion. If not all. http://docs.nativebase.io/

Was this page helpful?
0 / 5 - 0 ratings