Which NavigationBar? - javascript

RN currently has 2 official and a few community developed NavigationBars.
After reading the Navigator comparison it seems that Navigator is the favoured navigation controller implementation (superseding NavigatorIOS), as it allows decoupling the bar from the navigation logic.
But which navigation bar to use with it?
To my knowledge the main contenders are:
Navigator.NavigationBar
https://github.com/Kureev/react-native-navbar.js
Both get the job done, but what are the pros/cons of using one over the other?
Cheers :)

Here is what i've come to find out after playing with the Navigator.
Kureev's react-native-navbar is good if you want to quickly implement a navigation bar that looks similar to NavigatorIOS but with more functionality. The only thing you have to watch out for is the way that he has implemented the actual navbar. You'll notice in his example that he renders the navbar above the content and wraps it in a view, which makes the navbar a "per page basis." So when you push or pop a view the nav bar will change with the view. Currenty there is an issue addressing this thought (#62)
The Navigator component is pretty simple to use. Using the prop navigationBar you can create a consistent navbar that persists on state changes. The one pain i've found, is the navigation bar gets put below the rendered content, so you'll have to use some styling to get it to the top if thats where you want it.
To Sum up:
if you want quick and easy navigation use Kureev's
If you want more flexibility and the ability to do control more of you navigation bar, create a navbar component and use Navigators navigationBar prop.
And dont underestimate the examples from the React Native Team. Navigator examples

Related

What is the Best Practice between burguer menu & full screen menu in a react app

So i have a website, it is responsive, in small screens the menu is open clicking in a burguer button, when there is enough space the menu is visible in the header and the burguer button dissapear.
My question is what is the best practise to handle this componetes (the burguer is a components that change a context state showMenu).
Should I have 2 diferents Menu components MenuResponsive || MenuInHeader & mount unmount them dependimg on the screen size or only one component with a ton of CSS.
Im using css.module just in case.
thanks
The beauty is that you have options. If the button is going to be reused a lot, I would create a separate component. If not, then I would probably manage responsive design with CSS using media queries or something.

How to scroll with programming within Vuetify Virtual Scroller?

I have used this Vuetify component https://vuetifyjs.com/en/components/virtual-scroller/ to make a virtual scroll within a card, but now I need to go to a specific scroll element when my hook mount is executed component vue.
How could I do that, thank you in advance for your help?
I am a native of Spanish therefore my English is a bit bad.

How to manage scrollbars as we want

In the website I am currently creating, I am using Angular 8 (not sure whether the component paradigm has an influence on my troubles with scrollbars).
Like most websites, I need to implement a scrollbar in case the data does not fit the screen. But as I added more and more components, I realized that the way I used scrollbars was confusing and I ended up not being able to implement the behaviour I wanted.
I looked on the Internet but most ressources explain how to customize scrollbars, which is not what I am looking for. The article explaining the few CSS overflow properties were not very useful as well, because I did not have what I wanted, even though I kind of have tried every possibility (at least most I could think of).
Do you have any piece of advice to manage scrollbars ? Good practices & so on.
Currently the behaviour I am trying to implement is the following :
I have a home component containing a navbar and a router-outlet. The navbar is actually overflowing (because of box-shadow and an icon).
The router-outlet contains (if on the right page) a sidebar on the left side which represent a list of emails, and the content on the right. I don't want a global scrolling because I would have a empty space above the sidebar (where the navbar should have been but is gone because of scroll). I would need a scroll for the sidebar, and a scroll for the content.
So if you have any ressource which could help me understand how to use these scrollbars and manage them elegantly, that would be super appreciated :)
Try this perfect-scrollbar which is used for Angular 8.

Transculent screen on top of another in React Navigation

In my app, I have two screens, home and search. I have to show search on top of home. The background of search will be the blurred image of whatever is on home. I have tried using react-navigation method push to ddo this. But it is not working. How do I do this?
this.props.navigation.push('search');
If i have understood well, you need to use Modals. You have the basic documentation here. But i recommend you to use the react-native-modals library. Hope it works.

Vue-Router - Reverse transition on navigating back

I'm trying to implement a slide transition for the <router-view> component that slides content to the left upon navigating to a different page. To make things more intuitive, I'd like to reverse the transition if the user navigates back (which is achieved by swiping to the right on mobile and MacOS already). I already found an example in the vue-router documentation here, but it only applies to routes nested deeper, eg. with an additional URI segment.
I also found several SO questions and this issue which has an example for Vue1, but I'm using Vue2 so this is not relevant anymore.
Has anyone solved this? How would I go about reversing transitions on history navigation?

Categories