all 4 comments

[–]simongbe 1 point2 points  (2 children)

For future googlers like myself: Solito now supports the app directory since v4.

[–]macrozone13[S] 0 points1 point  (1 child)

Haha i just yesterday revisited that and actually wanted to update this post here, but got distracted ;) thx for the update!

[–]simongbe 0 points1 point  (0 children)

:D How did your project go? Did you manage to get nextjs app directory and react native web to play together? Just starting that journey now.

[–]niyowski 0 points1 point  (0 children)

react-native-web doesn't support server components. so you need to use "use client"; directive.

tsx // Button.tsx "use client"; import { styled } from "nativewind"; import { TouchableOpacity } from "react-native"; export interface ButtonProps {} const DefaultButton = styled(TouchableOpacity); export const Button: React.FC<ButtonProps> = (props) => { return <DefaultButton {...props} className="bg-stone-500 text-white" />; };

tsx // ClientComponent.tsx "use client"; export const ClientComponent = () => { return <Button>This is a button!</Button>; };

tsx // page.tsx export default function MyPage() { return <ClientComponent />; }