|
|
|
|
|
by mrkcsc
2888 days ago
|
|
The iOS application can safely pull data and perform actions from just about every Store (we don't use redux but the idea is the same https://redux.js.org/api-reference/store) and Action Handler (https://reactjs.org/docs/handling-events.html) that exists in the main Discord React application. So if one is writing a feature that say allows one to ban a user - they don't need to write any of the banning logic or worry about fetching the user data/validating it against server roles permissions - if it exists on the main Discord app, it can be safely imported. Other helpful examples are perhaps things like markdown parsing - iOS was able to just import and use the exact same system desktop uses to handle markdown and things like user/channel mentions, custom emoji, etc. On Android we had to write one ourselves: https://blog.discordapp.com/how-discord-renders-rich-message... On Android since there is no code re-use everything had to be written from scratch. |
|