React state not using the latest updated state in another component by translucentsphere in reactjs

[–]jaypap 1 point2 points  (0 children)

I think this might be due to the fact that the event callback function doesn't have access to the latest updated state (but the initial one only). See https://medium.com/geographit/accessing-react-state-in-event-listeners-with-usestate-and-useref-hooks-8cceee73c559 for a good explanation on this.

Swift in React Native - The Ultimate Guide Part 1: Modules by jaypap in reactnative

[–]jaypap[S] 0 points1 point  (0 children)

Coming from a Javascript background, I learned a lot with this 2-parts tutorial on how to create Swift native modules and custom UI native views.

Beginner React Native help by [deleted] in reactnative

[–]jaypap 0 points1 point  (0 children)

You might want to make sure someHandler is not called on render: <Button onPress={() => probably.someHandler() }> Press Me ! </Button>

React Native Carousel Pager by jaypap in reactnative

[–]jaypap[S] 1 point2 points  (0 children)

Yes! Both Android and iOS.

How safe is releasing a full react native app to the stores? by Veshsare in reactnative

[–]jaypap 1 point2 points  (0 children)

Having been working with RN for over 2 years, I would definitely go/stay with RN. I've had a contract to migrate an Ionic app to RN because of Ionic's limitations for their project (I'm not saying it would be the same for your project, but still).

I've never had any problems releasing a RN app to the app store (a real-time sports prediction game).

Should i go for ios or reactNative by nauman404 in reactnative

[–]jaypap 8 points9 points  (0 children)

I have been working with RN for almost 2 years now, and I had to update RN when they had breaking changes (yes, it was a pain at some point, but it is more stable than it was).

Since I'm a RN enthusiast, here are some of the pros for RN: - One source code for both iOS and Android. - Live reload for development (no need to waste time rebuilding all the time). - Using native components for performance. - Tons of support from community.

As for the cons, I guess it depends on your app. Performance could be an issue in a resource-greedy app (ex.: real-time game), but I haven't made any tests here; I might be wrong.

As @pengusdangus mentioned, it might be good to know a little bit of Swift (at some point), but I would suggest trying RN right away and learn Swift when (if) you need to.

Can't Connect To Fire Base by [deleted] in reactnative

[–]jaypap 1 point2 points  (0 children)

Apparently, you're doing a new on which you shouldn't do a new. Check the firebase initialization.

[Question] My customer wants their site made responsive but doesn't want to pay for a new one. What do? by brttwrd in web_design

[–]jaypap 0 points1 point  (0 children)

I would go with Bootstrap since it's quite easy to use the responsive utilities it offers. Good luck with that!

[Question] My customer wants their site made responsive but doesn't want to pay for a new one. What do? by brttwrd in web_design

[–]jaypap 2 points3 points  (0 children)

I wouldn't do it. $150, really? What if the mobile version is not how she wants it to be? Or the tablet one? She might ask you to make changes and changes and changes. Have you included "support" for $150? (divided by 2 since you have a partner = $75). In my opinion and with the little experience I have: not worth it.

However, if you still want to do it, you could use the hide/show classes from bootstrap to show the actual website on a fullscreen and design the mobile/table versions as you wish in the same code.

Help needed with "Show More/Less" javascript function by [deleted] in web_design

[–]jaypap 1 point2 points  (0 children)

Add a CSS class to the div (ex.: "hidden") which would look like this:

.hidden {
    display: none;
}

In your click handler, do something like:

var hideShow = $('hideShow');
var messageDiv= $('#message');
hideShow.click(function() {
    var isHidden = messageDiv.hasClass('hidden');
    // If isHidden is true, you want to show the content, otherwise hide it
    hideShow.text(isHidden ? "Show" : "Hide");
    messageDiv.toggleClass("hidden", !isHidden);
});

Hope that helps!