![]() Is it allows you to create your own custom tab bar, where is it, where? So you can just render a bar, you can pass any component that you want. Now with this scroller tab view, one is actually probably the best one I've seen because what it allows you to do which others don't. I think it tried to install while there was an error up, so it just couldn't connect to it and this happens sometimes. So the the device is offline, so I need it to shut it down and open it back up. Any questions on this so far? All right, cool. So this is a simple way just to get some pretty slick tabs in our app. Think I had to build it now, well, let's just reload just in case. So we'll just say TabView, we have our todo and then we'll say tablabel equals Todos. And it just have to have a tab label, we can put a tab bar here if we wanted to but it will just render one by default for us. ![]() > Scott Moss: All we have to do is just pass in as children the components that we want to render. And the way this works is if you look at the docks, it's actually pretty cool. So now we can just say scroll view or whatever we call it TabView. We haven't gotten to the section where we're gonna use native stuff yet. It doesn't have any native dependencies. This TabView that we're using right now is built to harvest in JavaScript which means it works on both platforms. Well, the scroll view tab, yes, the scroll view tab view will totally work because it's built in just JavaScript. Anyway, so the TabView here, we run Java right here in the main. Well, I had to come back to that, I'm not sure what Jessy is talking about. That is the container part of the Android part, the container part of the Android part that he mentioned. Like a lot of the docs use some stuff that's not used anymore. But I'm also pretty sure that that is deprecated. So I guess that whatever Jessy is talking about is only gonna work for iOS. They're trying to standardize everything but usually if it says UI on it or iOS only, it's only for that platform. ![]() > Scott Moss: Yeah, I think what he's asking for is for older version of react native, I don't they use that component anymore. > Speaker 2: So I don't understand the question that they're asking actually, so. > Scott Moss: UI page view controller, I'm pretty sure that's iOS only. Jessy T is asking about UI page view controller from iOS, if that will work? > Speaker 2: Question I think in the channel. So we'll say import and we'll say TabView from react-native-scrollable-tab-view. And this case is going to be main, so main is the root. So let's go there and then this case it's actually, is it the wrong app? Well, there it is, todo, you come up over here. It would be to perfect place to put the tab interview or the tab interface. I know, so the todo app, I would say appropriate place would be probably the root of our application. Let's go back to the design arch, now we're gonna be doing the todo app, we're now gonna go design our app. Let's head over and I now we just need to figure out an appropriate place to put this. So that means we can use require in our code and still works. But when that compiles down to ES5, it just turns to this anyway. ![]() ![]() This is how you require modules in common JS, we just used the ES6 version which is import. Sometimes you'll see require, if you're not familiar with node, that's just the ES5. So we'll download that and then we'll just import the react-native-scrollable-tab-view. So we can download it by NPM install this thing. > Scott Moss: All right so I'll let that run, so the first thing we need to do is actually download it. So we're gonna change a few things around in our todo app to actually have this makes sense. I was working on my own and halfway through I found this and I was like that's the one that I want. The person that made this did a really good job on it. > Scott Moss: And it's actually pretty simple. > Scott Moss: What we wanna do first is I'm just going to pull open the todo app. Import from "react-transition-group" Ĭonst = useState(false) const = useState(false) Ĭonst mediaQuery = window.matchMedia("(max-width: 700px)") mediaQuery.Transcript from the "Using the React Native Scrollable Tab View Component" Lesson ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |