Git Product home page Git Product logo

Comments (31)

Crash-- avatar Crash-- commented on May 22, 2024 7

Hi,

I think providing a concrete example, or a "full app" working with react-native-router-flux & NativeBase could be great for this project! This will make easier to new people to jump in.

from nativebase.

SupriyaKalghatgi avatar SupriyaKalghatgi commented on May 22, 2024 5

@vinaydate @Crash-- The boilerplate with NativeBase, Redux is live.
Native-Starter-Kit

from nativebase.

sankhadeeproy007 avatar sankhadeeproy007 commented on May 22, 2024 4

Yes, that is actually on our to-do list. A full boilerplate app with native-base, react-native-router-flux and redux

from nativebase.

tarr11 avatar tarr11 commented on May 22, 2024 4

I don't understand how this uses react-native-router-flux ? I don't see it anywhere in that example.

from nativebase.

sankhadeeproy007 avatar sankhadeeproy007 commented on May 22, 2024 3

The component should be nested inside the component.

from nativebase.

sankhadeeproy007 avatar sankhadeeproy007 commented on May 22, 2024 3

Yes, we are infact using that router for one of our projects. What we are doing is, we have a Router component at the root of our project. We define the scenes/routes in our router and for that, we don't need the Container component. We only use the container where we define our views, not the routes.

from nativebase.

ccdwyer avatar ccdwyer commented on May 22, 2024 3

@tarr11 Did you ever find a way to use RNRF with nativebase, and handle the header nicely?

Thanks

from nativebase.

vijaychouhan-rails avatar vijaychouhan-rails commented on May 22, 2024 3

Simple application at https://github.com/vijaychouhan-rails/AllInOne

from nativebase.

ccdwyer avatar ccdwyer commented on May 22, 2024 2

I'm waiting to switch to the new official navigation system once it is released, but in the mean time I am wrapping my scenes in a container, and then adding sceneStyle={{ paddingTop: ... }} to my Router, with different values for android and iOS.
So each of my scenes looks like:

<Container>
  <Content>
    ...
  </Content>
  <Footer>
    ...
  </Footer>
</Container>

As far as I can tell it works nicely, but I haven't tried it with too many devices, just my iPhone 7 Plus.

from nativebase.

Ariflo avatar Ariflo commented on May 22, 2024 1

For anyone who came here like me looking for an example of RNRF using Native-Base with custom tabs feel free to check out the hack I used for my wedding app here: https://github.com/Ariflo/aandr_wedding

The trick is passing a custom component to the tabBarComponent attribute:
https://github.com/Ariflo/aandr_wedding/blob/master/app/mobile/views.js#L23

Then using native-base to build that custom component:
https://github.com/Ariflo/aandr_wedding/blob/master/app/mobile/components/Footer.js#L4

To get here I found this article to be immensely helpful: https://medium.com/@sportnak/adding-custom-tabbed-navigation-in-react-native-router-flux-e08429c22cce

from nativebase.

shakdoesgithub avatar shakdoesgithub commented on May 22, 2024

which component should be nested inside which component?

from nativebase.

shakdoesgithub avatar shakdoesgithub commented on May 22, 2024

are you familiar with the react-native-router-flux component?

from nativebase.

vinaydate avatar vinaydate commented on May 22, 2024

Till your boilerplate app goes online, may I know, whether the <Container> should be parent of <Provider> (which in turn contains <RouterWithRedux>) or the other way round? Obviously, I can try out this, but I want theoretical point of view.

from nativebase.

SupriyaKalghatgi avatar SupriyaKalghatgi commented on May 22, 2024

@tarr11 The reason you didn't find implementation of react-native-router-flux in Native-Starter-Kit is that, NSK has been updated with RN Navigator.
Also NativeBase has nothing to do with react-native-router-flux. So that must be simple and straight forward.

from nativebase.

sankhadeeproy007 avatar sankhadeeproy007 commented on May 22, 2024

@tarr11 AFAIK, you can define all your views in one place using rnrf. There shouldn't be any change in implementation since native-base only provides UI components and requires no architectural changes to your app.
Also we've decided not to use rnrf in our app abd use the RN Navigator instead.
@vinaydate Container should ideally be the wrapper to your view components and so <Provider> should be the parent component.

from nativebase.

tarr11 avatar tarr11 commented on May 22, 2024

@SupriyaKalghatgi Thanks. I was trying to use RNRF with native base but the UI conflicted because RNRF takes over the "Header".

from nativebase.

StanSarr avatar StanSarr commented on May 22, 2024

@tarr11 @ccdwyer Hey guys did you find a way to use native base and RNRF with the RNRF header ?

from nativebase.

StanSarr avatar StanSarr commented on May 22, 2024

@ccdwyer awesome .. thank you for your answer gonna try it, I'll let you know :)

from nativebase.

alvarolorentedev avatar alvarolorentedev commented on May 22, 2024

@ccdwyer i have a small question, i am new to react native so in this case how does your router look like?
in my case its not working with:

//file appcontiner.js
const scenes = Actions.create(
     <Scene key="root" tabs={false} >
            <Scene key='home' component={Home} title="Home"/>
            <Scene key='home2' component={Home} title="Home2"/>
     </Scene>
);

class AppContainer extends Component {
render() {
        return <Router  {...this.props} scenes={scenes}/>
    }
}
//in file app.js
class App extends Component {
    render(){ 
        return (
            <Provider store={store}>
                <AppContainer />
            </Provider>
        );
    }
}

from nativebase.

StanSarr avatar StanSarr commented on May 22, 2024

@kanekotic
I'm using it with redux it looks like:

            <Provider store={store}>
                <RouterWithRedux>
                    <Scene key="root" hideNavBar={true}>
                        <Scene
                            key="tabbar"
                            tabs={true}
                        >
                            <Scene

                                key="key1"
                                component={Scene1}
                                title="Scene1"
                                icon={TabIcon}
                            />
                            <Scene
                                hideNavBar
                                key="key2"
                                component={Scene2}
                                title="Scene2"
                                icon={TabIcon}
                            />
                            <Scene
                                hideNavBar
                                key="key3"
                                component={Scene3}
                                title="Scene3"
                                icon={TabIcon}
                            />
                            <Scene
                                hideNavBar
                                key="key4"
                                component={Scene4}
                                title="Scene4"
                                icon={TabIcon}
                            />
                        </Scene>
                        <Scene key="stop" schema="modal" component={Stop} />
                    </Scene>
                </RouterWithRedux>
            </Provider>

from nativebase.

anonrig avatar anonrig commented on May 22, 2024

I'm facing the same problem. Anybody have any solution?

from nativebase.

StanSarr avatar StanSarr commented on May 22, 2024

@anonrig what do you wanna do ?

from nativebase.

vexsnare avatar vexsnare commented on May 22, 2024

NativeBase component's style, theme even website seems a copy of Ionic. When using NativeBase most of the times I end-up injecting lot of my own custom styles into what native base provides and it takes more time since I have to read and understand their doc in-order to avoid conflict and It takes less time if I use core component and apply custom styles. NativeBase components are tightly coupled, personally I don't like this idea. I would love if they can provide individual component rather than a big ui framework, since its very hard to understand their library code. I really appreciate NativeBase Team work, but just my thought that everybody likes flexibility.

from nativebase.

sanketsahu avatar sanketsahu commented on May 22, 2024

@vexsnare Did you check v2.0 and it's eject feature?

from nativebase.

vexsnare avatar vexsnare commented on May 22, 2024

@sanketsahusoft Yes I checked v2.0, added it to my project and It has completely broken my existing UI, mainly Input Group. I see you guys are now using Form component instead of InputGroup so tried to use that but again I wanted to customise floating label input style different than placeholder style and I failed to do that. Reverted back to 0.5.22.

from nativebase.

beausmith avatar beausmith commented on May 22, 2024

FWIW, it looks like NativeBase's boilerplate Native-Starter-Kit has switched to use React Native Router Flux as of Apr 7, 2017. Here's the commit: start-react/native-starter-kit@3e7b5a1

cc: @shakdoesgithub @Crash-- @vinaydate @tarr11 @ccdwyer @StanSarr @anonrig

from nativebase.

StanSarr avatar StanSarr commented on May 22, 2024

@beausmith Awesome Thanks 👍

from nativebase.

vijaychouhan-rails avatar vijaychouhan-rails commented on May 22, 2024

official example at: http://docs.nativebase.io/docs/examples/navigation/RNRFBasicExample.html

from nativebase.

angelfeliz avatar angelfeliz commented on May 22, 2024

People of NaviteBase, there are two example of navigation on your page one is with ReactNavigation and is using your Drawer component and the other one with RNRF wich have a example of navigation to other page. Can you please do example of navigation usign RNRF and the Drawer component. Some peoples are having trouble with the Drawer component and RNRF

from nativebase.

SupriyaKalghatgi avatar SupriyaKalghatgi commented on May 22, 2024

NativeBase KitchenSink has implementation of RNRF

from nativebase.

kharikbo avatar kharikbo commented on May 22, 2024

Hi everybody!
At the moment, all repositories above projects either do not use RNRF or versions are no longer supported.
Does anyone know a way to use NativBase and RNRF?
Help.

from nativebase.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.