Copying and Pasting issues

I have multiple screens that have the exact same components, groups, connections, etc. I get it to look and behave how I want, then I copy and paste to the other screens. When I copy it over, you can go into each component and it shows the correct information, but the connections have broken, for some reason. The connections don’t work until I go in and delete the connection and adding it again. Am I doing something wrong here? Is this a bug, or how it is supposed to behave?

I think that’s how it’s supposed to work. Because typically data from one screen is transferred from the previous screen. If you just copy the components over to a new screen, the connections will be broken, so to speak.

I would consider this more of a limitation than a bug. Even if you were to handcode, you can’t just copy and paste React Native code over to a new screen, there’ll still be some tweaking, AFAIK.

Hope that helps :slight_smile:

This is working as intended. It would be a total mess if it presumed which connections to make to screens that may or may not be the right ones.

If you duplicate the app in its entirety, then all connections will remain the same.

@vancewong @Colin
I totally get that. What’s the best way, then, to do this? I have to go into about 15 different components and update the connection on each of them every time I update it. I have the exact same info on 6 different screens. That is very time consuming and monotonous. Any help would be much appreciated.

Hey @nodnarb1129, I think we should take one step back and think if there’s a better way than to have 6 separate screens with the exact same info.

If you’re trying to show content conditionally to different users, consider creating a Roles collection with a one to many relation with your Users collection.

You can then adjust the visibility of components on the screen depending on the user’s role.

@vancewong
I may be doing it a dumb way, but this is what I have. In order to sort events multiple ways, I have to have 3 screens that have the exact same data, but filters the list a different way. I will add an image here to help with the visual. Also, note that these don’t all look the exact same because it takes so long to go in and change the connections with each component. Laziness is definitely an issue here haha.

@nodnarb1129 Ok, now it’s making sense to me. I’m doing it the exact same way for our yoga studio booking app.

There’s a screen for past classes, and another for upcoming classes. Both screens have very similar data, just that they have different filters.

To be very honest with you, I just powered through the re-entering of magic text and connections for each screen.

It’s absolutely necessary in this case, unless you’re able to come up with a custom-coded component using their developer mode, that allows you to apply those filters using their GUI.

If you do, please share with the community :joy:

@vancewong Thanks for the reply. So, what do you do if you have to make a small change? Do you just copy and paste the whole thing to each screen and then update all the magic text and connections? Or do you just try to update that one thing on each screen? If so, what’s your method of making sure that they are in the exact same spot?

@Colin Any other thoughts?

Copy and paste everything on the new screen and go through each one to make sure it’s correct, followed by a test to make sure it’s working properly as intended.

As for the alignment, if you’re copying from one screen to another, copy from the first screen, select the next screen (make sure you’re selecting the frame) then paste. It’d paste in the same spot.

Try not to adjust any alignments after that.

Also, with any kind of app or web development, the process of testing and retesting to make sure everything works properly is inevitable. It’s a matter of setting a process and workflow in place so that it’s efficient, that’s all, IMO.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.