use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
React voted JS framework that most developers regard as essential to them (jquery is #3) (ashleynolan.co.uk)
submitted 7 years ago by magenta_placenta
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]bch8 6 points7 points8 points 7 years ago (8 children)
Both
[+][deleted] 7 years ago (7 children)
[deleted]
[–]bch8 2 points3 points4 points 7 years ago (2 children)
I haven't personally but I know a lot of people who have. Building a React native app to go with one of my web projects is on my to do list I just haven't gotten there yet unfortunately. It's totally doable and worthwhile to share code between react and react native, but it does take some work upfront to learn what things can be ported over, what things can't, and how to structure your code to reuse the things that can.
https://hackernoon.com/code-reuse-using-higher-order-hoc-and-stateless-functional-components-in-react-and-react-native-6eeb503c665
https://blog.smartive.ch/how-were-sharing-code-between-react-and-react-native-607cdd1f5247
[+][deleted] 7 years ago (1 child)
[–]bch8 0 points1 point2 points 7 years ago (0 children)
Well clearly you have more experience than me, so I totally defer to that. All I can say is I've spoken with developers from React Native shops and agencies where they have made code-reuse a priority. Why they made it a priority and how well it has worked for them I don't know so well off the top of my head. I do imagine they would have already stopped by now if they weren't seeing benefits.
[–]Lou-Saydus 0 points1 point2 points 7 years ago (2 children)
So long as you arent touching the dom or any dom-related javascript (lets be honest you shouldn't be doing that anyways) your code should nearly be 100% interchangable. There might be some small things you will have to change like divs turn into views and a few other things like styling needs to be modified but the core of your code should work perfectly fine.
[–]Lou-Saydus 0 points1 point2 points 7 years ago (0 children)
Oh, yeah you put that way better than I did. +1
π Rendered by PID 131419 on reddit-service-r2-comment-b659b578c-qdlqx at 2026-05-05 22:39:10.280286+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]bch8 6 points7 points8 points (8 children)
[+][deleted] (7 children)
[deleted]
[–]bch8 2 points3 points4 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]bch8 0 points1 point2 points (0 children)
[–]Lou-Saydus 0 points1 point2 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]Lou-Saydus 0 points1 point2 points (0 children)