Is This Native or Web? React Native for Web Breaks the Boundaries

Siso NgqolosiSiso Ngqolosi
1 min read

Airbnb Comes to the Web: Experience Native Performance with React Native! Ever dreamed of building an Airbnb-like web app with the smooth performance and intuitive feel of a native mobile app? Now you can, thanks to the power of React Native! ✨

Ensure you have Node.js and Expo CLI installed on your machine.
Clone this repository:

git clone https://github.com/gluestack/ui-examples.git

Install dependencies:

npm install or yarn

Here is the rest of the code


...
return (
  <>
    {/* top SafeAreaView */}
    <SafeAreaView
      style={{
        backgroundColor: colorMode === "light" ? "#E5E5E5" : "#262626",
      }}
    />
    {/* bottom SafeAreaView */}
    <SafeAreaView
      style={{
        ...styles.container,
        backgroundColor: colorMode === "light" ? "white" : "#171717",
      }}
    >
      {/* gluestack-ui provider */}
      <GluestackUIProvider config={config} colorMode={colorMode}>
        <ThemeContext.Provider value={{ colorMode, toggleColorMode }}>
          {/* main app page */}
          <SSRProvider>
            <HomestayPage />
          </SSRProvider>
        </ThemeContext.Provider>
      </GluestackUIProvider>
    </SafeAreaView>
  </>
);
}
...
0
Subscribe to my newsletter

Read articles from Siso Ngqolosi directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Siso Ngqolosi
Siso Ngqolosi