Coder Social home page Coder Social logo

Setup React Native mobile app about connect HOT 8 CLOSED

calebmer avatar calebmer commented on May 22, 2024
Setup React Native mobile app

from connect.

Comments (8)

mdgozza avatar mdgozza commented on May 22, 2024 1

@Domthegrom This is why that works:
https://github.com/calebmer/connect/blob/master/web/next.config.js#L11

from connect.

Domthegrom avatar Domthegrom commented on May 22, 2024

React native will be getting Hooks eventually. Is this something that you may want to push back on that way we can use RN out of the box.

How would you plan to use react web components as React Native components?

I am a bit familiar with React Native to Web using https://github.com/necolas/react-native-web

But I haven't seen a transition from web components to native components.

from connect.

calebmer avatar calebmer commented on May 22, 2024

Since they use the same API the web components should just “work” in React Native. For example, take a look at:

export function ProfileSignature({
name,
image,
time,
children,
}: {
name: string;
image: string;
time: string;
children: ReactNode;
}) {
return (
<View style={styles.container}>
<ProfileImage image={image} />
<View style={styles.body}>
<View style={styles.header}>
<LabelText>{name}</LabelText>
<View style={styles.headerTime}>
<LiteText>{time}</LiteText>
</View>
</View>
{children}
</View>
</View>
);
}

It uses <View> instead of <div> which should mean we can use it in React Native no problem.

from connect.

baruchadi avatar baruchadi commented on May 22, 2024

You can use View in Web React?

from connect.

Domthegrom avatar Domthegrom commented on May 22, 2024

To me that looks like a React-Native component that won't render in Web React. You imported View from react-native

from connect.

calebmer avatar calebmer commented on May 22, 2024

@baruchadi with http://yarn.pm/react-native-web yes

from connect.

calebmer avatar calebmer commented on May 22, 2024

Looks like it renders to me @Domthegrom

image

from connect.

calebmer avatar calebmer commented on May 22, 2024

I did this, but didn’t even touch Android yet #18

from connect.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.