#1 Using Custom Fonts | Expo | React Native | Everything Expo

Поділитися
Вставка
  • Опубліковано 11 гру 2024

КОМЕНТАРІ • 39

  • @hiraawan3430
    @hiraawan3430 4 роки тому +1

    i was stuck for 2 days in this and you actually make me understand, highly appreciated !!

  • @pavanshirguppi5261
    @pavanshirguppi5261 4 роки тому

    Good one. I have tried the second half meaning not the expo part. and the logic and approach is working. Thanks. Keep making practical react videos.

  • @vincentandrieu5429
    @vincentandrieu5429 5 років тому +1

    Great idea to have a series about expo components ! I will watch all the episodes :)

  • @zainulabideen5587
    @zainulabideen5587 4 роки тому

    Thankyou sir for explaining expo integration Sdk and other stuff in a easy way.! :) alot of love form Pakistan

  • @evengrant1616
    @evengrant1616 5 років тому +7

    Can you make an tutorials on responsive size layouts without Expo?
    It will be much helpful

  • @ekasatriabahari2264
    @ekasatriabahari2264 5 років тому

    First like!!!
    You are like my sensai in react native

  • @vocabra
    @vocabra 3 роки тому

    This video was helpful, Thankyou!

  • @mhmdnayef710
    @mhmdnayef710 5 років тому

    As always , fantastic

  • @mannyquintero2190
    @mannyquintero2190 5 років тому

    the custom fonts are showing up correctly, but im getting an error in the console saying:
    fontFamily "OpenSans-Light" is not a system font and has not been loaded through Font.loadAsync.
    //(it appears for whatever type font is in default inside the customText.js switch )
    - If you intended to use a system font, make sure you typed the name correctly and that it is supported by your device operating system.
    - If this is a custom font, be sure to load it with Font.loadAsync.
    I have Expo SDK as version ^34.0.1 and NO 'expo-font' version under dependencies (im sorry i dont know if it has anything to do with it)
    P.D. : followed this video exactly so there should be no problem with syntax.. it even works! just strange how the errors show up in cmd console and browser console

  • @OliBully
    @OliBully 4 роки тому

    UPDATE ON THE VIDEO
    If you are using Functional Components then simply use the hook useFont . Here is an example how you can load it.
    useFont({
    'Helvetica': require('/assets/fonts)
    })
    and now you can use the font on your style property.
    BUT here is the problem with this. We know that our fonts will take time to Load , so if suppose you are rendering a year's calender and using this new font, maybe only the last two months will use the newly loaded font just because it was not ready while the rendering started. To solve the problem we have to understand that the useFont when ready and loaded returns 1. so lets store the return of the useFont hook into a variable.
    let [fontsLoaded] = useFonts({
    'Inter-Black': require('./assets/fonts/Inter-Black.otf'),
    });
    now
    if(!fontsLoaded) // this means that if fonts are not loaded
    {
    return
    }
    else //if loaded
    {
    return yourItems;
    }
    Hope this helped!

  • @douglaseduardo220483
    @douglaseduardo220483 4 роки тому

    What's this font man? I need it so much.

  • @froyorex4856
    @froyorex4856 5 років тому +1

    Can you make a video about profile data in React-Native and Firebase
    Like :
    profile image upload,
    Username change,
    Bio edit,
    Without expo.

  • @kartikeypandey5920
    @kartikeypandey5920 4 роки тому

    Thank-you so much, this video helped me a lot.

  • @abdoulghadiry
    @abdoulghadiry 5 років тому +1

    For those of you getting "undefined is not an object (evaluating '_expo.Font.loadAsync')]" you should import import * as Font from 'expo-font'; instead of import {Font} from 'expo';

    • @chaitanyasairam7259
      @chaitanyasairam7259 4 роки тому

      Worked like a charm. Thank you so much.
      @Unsure Programmer Please update this in the description.

  • @williamrobersone3582
    @williamrobersone3582 5 років тому

    Could you post a video of a scrollable tab navigator & a bottom tab navigator with a background color? (React V3/ expo)

  • @suvink
    @suvink 4 роки тому

    'Font' has been moved into expo-font package. Not available in expo straight away anymore!

  • @KumarRaunakNCCS
    @KumarRaunakNCCS 5 років тому

    it is showing a warning and font is not getting loaded
    undefined is not an object (evaluating '_expo.Font.loadAsync')]

  • @zabipakdel6004
    @zabipakdel6004 5 років тому

    how can I reduce the app size via Expo ???

  • @farhantubeify
    @farhantubeify 5 років тому

    what's the vscode theme?

  • @ixior84
    @ixior84 5 років тому

    Thanks you for this video! One question... If I load the font in App.js, Can I use this font in all screens? Or Do I need to call Font.loadAsync in all screens? How can I load it once time? Thanks in advance!!!

  • @pwnweb5734
    @pwnweb5734 5 років тому

    Awesome vid as usual

  • @N1C014Z
    @N1C014Z 5 років тому

    Make a Udemy course and I promise you I'll get it. This is so good!

  • @lengoctho4827
    @lengoctho4827 5 років тому

    Sorry. I use expo, but when add react-native-share then react-native-link not working. How to fix?

    • @lengoctho4827
      @lengoctho4827 5 років тому

      I searched a lot but couldn't fix? Help me?

  • @rohitbit1394
    @rohitbit1394 4 роки тому

    Getting warning like:
    TypeError: Font.loadAsync is not a function.
    ...'Font.loadAsync' is undefined.
    And as the font couldn't be loaded the screen keeps loading. I am stuck at the first part only.

    • @tales4604
      @tales4604 4 роки тому

      I had this problem too. below worked for me:
      import { loadAsync } from "expo-font";
      import React from "react";
      const Home = ({ navigation }) => {
      const [fontLoaded, setLoaded] = React.useState(false);
      React.useEffect(() => {
      async function go() {
      await loadAsync({
      "Montserrat-R": require("../assets/fonts/Montserrat-Regular.ttf"),
      "Montserrat-B": require("../assets/fonts/Montserrat-Bold.ttf"),
      "Montserrat-BI": require("../assets/fonts/Montserrat-BoldItalic.ttf"),
      "Montserrat-I": require("../assets/fonts/Montserrat-Italic.ttf"),
      });
      setLoaded(true);
      }
      go();
      }, []);
      if (!fontLoaded) {
      return ;
      }
      return ({/* your code */})
      I found on expo docs
      docs.expo.io/versions/latest/guides/using-custom-fonts/

    • @rohitbit1394
      @rohitbit1394 4 роки тому

      @@tales4604 I didn't do much change. Just imported the Font from 'expo-font' and then ran react-native link. It worked for me.
      Thanks for the reply anyway.

  • @kayan_dev
    @kayan_dev 4 роки тому

    this is so pro

  • @danialmunsif1062
    @danialmunsif1062 5 років тому

    You imported Text from CustomText. and it is still working how?

    • @UnsureProgrammer
      @UnsureProgrammer  5 років тому +1

      you can name the import whatever you like irrespective of the name of the class/function in the file you are importing from.

  • @muhammadjawwad40
    @muhammadjawwad40 5 років тому

    Object.assign - {} , this.props. {style:style} -
    Q1: why empty object ?
    Q2 : why this.props only?

    • @UnsureProgrammer
      @UnsureProgrammer  5 років тому

      Q1. You are creating a new object in which you are combining 2 other objects.
      Q2. this.props - props is the only other thing you would pass down apart from styles.

  • @emilianoesteban249
    @emilianoesteban249 5 років тому

    Github does not have the files explained in this video
    👎

  • @diamantisufi6133
    @diamantisufi6133 4 роки тому

    Thank you

  • @brianfortuna50
    @brianfortuna50 5 років тому

    Simple CRUD sqlite with expo =)

  • @jon962-g9w
    @jon962-g9w 5 років тому

    wtf is that viscode theme