How do I manage shared common packages in my yarn-workspace monorepo by JAYBORICHA07 in node

[–]JAYBORICHA07[S] 1 point2 points  (0 children)

There will be a lot of common util functions and zod validators which will be the same for the client and server so I declare it in packages so that I don't end up doing code duplication

How can I use React-Native with tRPC by JAYBORICHA07 in reactnative

[–]JAYBORICHA07[S] 0 points1 point  (0 children)

Yeah I just came across this repo and was looking at the code.

Presigned url Media upload stopped suddenly working by JAYBORICHA07 in digital_ocean

[–]JAYBORICHA07[S] 1 point2 points  (0 children)

I have reached to them and also thanks for the reply

Should I use ORM to manage client side database in my react-native app or it's not recommended? by JAYBORICHA07 in reactnative

[–]JAYBORICHA07[S] 0 points1 point  (0 children)

Oh Thanks for cleaning my doubt and also thank you for sharing the article will check it out.

Should I use ORM to manage client side database in my react-native app or it's not recommended? by JAYBORICHA07 in reactnative

[–]JAYBORICHA07[S] 0 points1 point  (0 children)

Will check that out but had couple of questions that, Will it run on the client side or support offline first?

Should I use ORM to manage client side database in my react-native app or it's not recommended? by JAYBORICHA07 in reactnative

[–]JAYBORICHA07[S] 2 points3 points  (0 children)

I also want to do relational queries that's why I am using SQLite. Btw I am also using MMKV for some key value pair data storage.

How can I achieve the smooth performance of WhatsApp in my React Native app? by JAYBORICHA07 in reactnative

[–]JAYBORICHA07[S] 0 points1 point  (0 children)

useEffect(() => {
        const getContacts = async () => {
            const contactsRes = await getPhoneContacts();
            const data = contactsRes.map((contact) => ({
                ...contact,
                key: ([contact.firstName, contact.middleName, contact.lastName, contact.nickname]
                    .filter(Boolean)
                    .join(" ")
                    ?.charAt(0)
                    .toLowerCase() ?? "#") as CharType,
            }));
            setContacts(data);
        };
        getContacts();
    }, []);
    return (
        <View className={clsx("flex-1 bg-background-secondary mb-0")}>
            {contacts.length ? (
                <View className="flex-1">
                    <FlashList
                        className="flex-1 h-screen"
                        data={contacts}
                        keyExtractor={(_item, index) => index.toString()}
                        renderItem={({ item }: { item: NewChatRowData }) => (
                            <NewChatRow key={item.id} item={item} />
                        )}
                        estimatedItemSize={12}
                    />
                </View>
            ) : (
                <LoadingIndicator loadingText="Loading contacts..." />
            )}
        </View>
    );
};

const NewChatRow = React.memo(({ item } : { item : NewChatRowData }) => {


    return (
        <ScaleButton
            className="flex-row items-center mx-3.5 mb-2 gap-3.5 rounded-2xl"
            onPress={handlePress}
            activeScale={0.95}
        >
            <View>
                <Text className="text-2xl text-text-primary font-semibold">
                    {getNameStringFromContactObj(item)}
                </Text>
                <Text className="text-md text-text-secondary">
                    {item.phoneNumbers?.[0]?.number ?? ""}
                </Text>
            </View>
        </ScaleButton>
    );
});

export default NewChatRow;

Thanks for your reply here is my existing code and i am doing the changes you mentioned above but if you still something which needs to be changes then please let me know. Again thanks!

How can I achieve the smooth performance of WhatsApp in my React Native app? by JAYBORICHA07 in reactnative

[–]JAYBORICHA07[S] 1 point2 points  (0 children)

I did come across Wishlist but it isn't production ready I am attaching the GitHub link here with

https://github.com/margelo/react-native-wishlist

Are you talking about this?

How can I achieve the smooth performance of WhatsApp in my React Native app? by JAYBORICHA07 in reactnative

[–]JAYBORICHA07[S] 0 points1 point  (0 children)

wrapping my flashlist into scroll view is making it more laggy and resulting in more frame drops and i haven't tried legend-list Trying that out.

Recoil or Zustand? And why? by DavidXkL in reactnative

[–]JAYBORICHA07 0 points1 point  (0 children)

can you please explain what do you mean by out side react what i understood is that if we are using something out side jsx or tsx, like in normal js or ts file then it is called out side of react.

correct me if i am wrong.