React Native Tutorial #18 - Global Styles

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ธ.ค. 2019
  • Hey gang, in this React Native tutorial we'll apply some global styles to our components in an external "styleseet".
    ----------------------------------------
    🐱‍💻 🐱‍💻 Course Links:
    Course files - github.com/iamshaunjp/react-n...
    🐱‍💻 🐱‍💻 Other Related Courses:
    + Complete React Tutorial - • Complete React Tutoria...
    + React Hooks & Context Tutorial - • React Context & Hooks ...
    + Modern JavaScript Tutorial - • Modern JavaScript Tuto...

ความคิดเห็น • 26

  • @mimimumu8652
    @mimimumu8652 4 ปีที่แล้ว +6

    Since I've discovered this guy's tutorials I refused to follow anyone else tutorial! Thanks for the content you're sharing, your work is absolutely amazing, I've learnt so much thanks to your channel. The way you teach makes everything easy ! You really deserve more recognition !

  • @ravibhati9270
    @ravibhati9270 4 ปีที่แล้ว

    Very nice info. I am waiting for this video. Keep up the good work.

  • @mmhgarcia
    @mmhgarcia 3 ปีที่แล้ว

    Thanks, Good Video !! Helped me.

  • @cedrickvstheworld1810
    @cedrickvstheworld1810 3 ปีที่แล้ว +1

    I did the same! I'm glad that the ninja thinks the same :D

  • @jayanisumudini6662
    @jayanisumudini6662 4 ปีที่แล้ว +6

    Thank you.Excellent!!!.
    And I think no need to import 'StyleSheet' into the about , home and reviewDetails files now.

  • @omprakash5294
    @omprakash5294 2 ปีที่แล้ว

    Hi your tutorial just awesome you know both flutter amd react native so which one you recommend?

  • @travel_worldwide_365
    @travel_worldwide_365 3 ปีที่แล้ว

    Great !

  • @patric_forreal
    @patric_forreal 4 ปีที่แล้ว +8

    Broo, Thanks a lot for This informative lessons of you,
    Also broo I have a request to You, Broo on your Node Js Tutorial's last episode you promised to do other Node Js related tutorials such as Web Sockets, and Mongose DB congrats to you broo, you did it!!!
    It's only one part that you didn't covered and you also promised, the part of UNIT TESTING IN JAVASCRIPT USING MOCHA AND CHAI, Broo as you know unit testing is super important,
    So I humbly request for the sake of Others and Me as well, to have a consideration on that important aspect,
    It is my hope that my request with be accepted before you
    Thanks once again for your crusial help in educating the public !!!!

  • @sidharthpunathil
    @sidharthpunathil 4 ปีที่แล้ว +5

    How would you loadasync if you were not using expo?

  • @afro_habesha
    @afro_habesha ปีที่แล้ว

    tnx again

  • @manoj-k
    @manoj-k 2 ปีที่แล้ว

    🔥🔥🔥

  • @pranaydas7382
    @pranaydas7382 4 ปีที่แล้ว +1

    Hey, I really like this tutorial . I want to ask will there be any tutorial using react navigation, with context api and hooks? thank you

  • @angelafamera6573
    @angelafamera6573 3 ปีที่แล้ว +3

    getting error: "undefined is not an object (evaluating '__global.default.container')". Any solutions?

    • @saravanasai2391
      @saravanasai2391 3 ปีที่แล้ว +2

      import {globalStyles} from '../styles/global'; use the curly braces ..me to faced this iissue

  • @paungster
    @paungster หลายเดือนก่อน

    👏

  • @israelikechukwu9280
    @israelikechukwu9280 ปีที่แล้ว +1

    Here's how I solved the custom font issue, where AppLoading module is deprecated:
    import Home from "./screens/Home";
    import { useFonts } from "expo-font";
    import * as SplashScreen from "expo-splash-screen";
    import { useCallback } from "react";
    import { View } from "react-native";
    SplashScreen.preventAutoHideAsync();
    export default function App() {
    const [fontsLoaded] = useFonts({
    "oswald-bold": require("./assets/fonts/Oswald-Bold.ttf"),
    "oswald-regular": require("./assets/fonts/Oswald-Regular.ttf"),
    });
    const onLayoutRootView = useCallback(async () => {
    if (fontsLoaded) {
    await SplashScreen.hideAsync();
    }
    }, [fontsLoaded]);
    if (!fontsLoaded) {
    return null;
    }
    return (



    );
    }

  • @saurabhjain2161
    @saurabhjain2161 4 ปีที่แล้ว

    I got this error every time. If i dismiss, the app works fine.
    fontFamily is not a system font and has not been loaded through Font.loadAsync

    • @kbk489
      @kbk489 5 หลายเดือนก่อน

      does it show as yellow or red, if its yellow then its nothing bad

  • @abhishekgadewar4616
    @abhishekgadewar4616 ปีที่แล้ว +1

    when i add flex=1 the text just goes out of page and is not visible

    • @blangkowala2395
      @blangkowala2395 6 หลายเดือนก่อน

      DO YOU HAVE ALREADY FIX IT?

    • @userknownunknown
      @userknownunknown 4 หลายเดือนก่อน

      I might be a little late to reply to you but for future viewers, check if in your App.js you have a View component as a parent to your Home component and set its styles={{ flex: 1 }}. That solved the issue for me. So basically it was in App.js.

  • @abdelaesus6678
    @abdelaesus6678 3 ปีที่แล้ว +2

    "the development server returned response error code 500" this is what i get. There is no way to make the global styles work.

  • @SkyLordPanglot
    @SkyLordPanglot 2 หลายเดือนก่อน

    Great content, but this is not exactly global styles. This is importing the same constant and pasting it on every line. Isnt there a way to really set styles for the whole app without copy pasting a stylesheet every line? For example I need to set my font to sofiasans for the whole app, but there is no way to do that. I need to pass through every text field and apply style to them. What happens if they are hundreds of thousands?

  • @tanukichi5250
    @tanukichi5250 4 ปีที่แล้ว

    0:36 ~