[GH-ISSUE #83] Sharing code between proton-native and react-native #50

Closed
opened 2026-05-05 11:32:33 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @dchersey on GitHub (Apr 21, 2018).
Original GitHub issue: https://github.com/kusti8/proton-native/issues/83

Hi, thank you for your efforts in creating this framework!

I have an existing RN app that is under development and would love to add a desktop (Mac, windows, linux) target to it ... I understand I'd have to build new views but my redux actions, reducers, api, etc could all be re-used by them.

Any tips on how to structure the code so that I can keep it to one code base?

Originally created by @dchersey on GitHub (Apr 21, 2018). Original GitHub issue: https://github.com/kusti8/proton-native/issues/83 Hi, thank you for your efforts in creating this framework! I have an existing RN app that is under development and would love to add a desktop (Mac, windows, linux) target to it ... I understand I'd have to build new views but my redux actions, reducers, api, etc could all be re-used by them. Any tips on how to structure the code so that I can keep it to one code base?
Author
Owner

@kusti8 commented on GitHub (Apr 22, 2018):

When I used react Native, I mostly used ignite cause it came with a really good structure. I can't remember exactly what it was, but basically you have a folder for state changes, folder for API, folder for stateless pure components and then a folder for state full components. IMHO that would be how I would do it. If you're doing anything that requires differing libraries, make that a separate file.

Basically, separate the different parts of it and make it modular (same API) so that to convert, you just have to change the react Native components and props to proton native components and props.

<!-- gh-comment-id:383406165 --> @kusti8 commented on GitHub (Apr 22, 2018): When I used react Native, I mostly used ignite cause it came with a really good structure. I can't remember exactly what it was, but basically you have a folder for state changes, folder for API, folder for stateless pure components and then a folder for state full components. IMHO that would be how I would do it. If you're doing anything that requires differing libraries, make that a separate file. Basically, separate the different parts of it and make it modular (same API) so that to convert, you just have to change the react Native components and props to proton native components and props.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/proton-native#50
No description provided.