Roact/Rodux/ReplicaService help

I’m making a UI that has it’s content based off of data in a replica. Should I refer to the Replica, or value in the UI? Should I put that information in the context or Rodux store?

Do whatever works, don’t drive yourself crazy trying to figure out which of a bunch of options is better.

As you write code you will see what’s better and what’s worse, what’s important is that the code is readable, maintainable and easy to change.

You’ll lose your mind if every time there are multiple options you try to figure out which is best (I know from experience)

I understand, but I’d still like to know the pros and cons before making my decision. So I’m hoping someone can elaborate on this matter.

Okay, well I don’t know about Rodux and I know a little about Roact.

If the UI content is based off replicated state, you can (should?) just read directly from the Replica, I mean that’s what replicas are for (replicating state from the server to clients)

I think it’s better not to spend time trying warp your code into a framework, frameworks are meant to give structure especially for big projects. But until you actually have a big project I think it can be counterproductive to try to stuff your code into a rigid structure. The important thing is that you can read and change code for the future, so that your codebase doesn’t collapse on itself. That’s at least from my own experience.

Anyway imma shut up now, good luck.

Edit: Look at this page Program optimization - Wikipedia.

1 Like