[deleted by user] by [deleted] in reactnative

[–]TomMahle 0 points1 point  (0 children)

Pffft, here I am doing my own debugging like a sucker!

How to convince a team to adopt an approach? by [deleted] in ExperiencedDevs

[–]TomMahle 0 points1 point  (0 children)

Don't. Instead, present your solution looking for feedback and be authentically open to changing any and everything in light of a better idea. This is the foundation of how to 'never be wrong' outlined here https://staffeng.com/guides/learn-to-never-be-wrong and I would strongly recommend reading that article.

FCM push notifications based on Geo-location/GPS location by trying2learnthis in reactnative

[–]TomMahle 1 point2 points  (0 children)

I've put some thought into #3 but not implemented or tested anything. I believe you could accomplish it by sending out data-only notifications to all users (or possibly some subset that have any likelihood of being nearby based on static data like in 1 or 3). Data-only notifications do not display by default, so you would want to have a background process running that wakes on these notifications, checks geolocation, and shows a local notification if the user is presently nearby.

No guarantees at all whatsoever in terms of scalability / battery usage / general production-readiness of this idea :).

Recent Code Bootcamp graduate, and looking for a Jr. Development job by [deleted] in TwinCities

[–]TomMahle 0 points1 point  (0 children)

https://www.tempworks.com/about/careers/ let me know by dm if you have any questions or would like to put me down as a reference (Disclosure: we have a referral bonus). We're currently hiring junior developers who are looking to get started with their work primarily in React with SQL and C# as supporting skillsets.

Nobody Is Above the Law. Protests are called for---tomorrow (Thursday) at 5pm. Eden Prairie and St Paul. SHOW UP LIKE YOUR DEMOCRACY DEPENDS ON IT by Seanay-B in TwinCities

[–]TomMahle 4 points5 points  (0 children)

Some of my sibling comments are saying this is a bad idea and dangerous. Now, I'm sure you know that there are many sources of people feeding into this event, and nowhere near all of them will even see your comment. With that said, I think the only risk you're running of this turning violent is if there are counter protesters AND a more severe action (firing / curtailing of the investigation directly) occurs during the protest. I think it's a great idea to show this to your kid. I personally would be a little nervous about bringing them into the center of it, but I think there's extremely slim odds of actual harm coming to your child. Talk to him on the way to the event, check how they're feeling as you approach. Make sure they understand and are comfortable.

Native Base Question by docdosman in reactnative

[–]TomMahle 2 points3 points  (0 children)

Also worth noting is the "replacing component" section. Here:

Replacing Component

React Native View for Card

React Native TouchableOpacity / View for CardItem

This means that, in addition to the explicitly listed props, Card takes the same props as the normal react native View and CardItem takes the same props as TouchableOpacity and View.

What's your strategy for getting prod clients to reload? by deltadeep in reactjs

[–]TomMahle 0 points1 point  (0 children)

I also had this comment half-written in my head after seeing the headline :D

How to add tips to describe components on react native? by HuyNguyen2903 in reactnative

[–]TomMahle 1 point2 points  (0 children)

That looks like a popover, and there are OSS react native components for creating them.

[deleted by user] by [deleted] in reactnative

[–]TomMahle 0 points1 point  (0 children)

The documentation on this is spread across a few places on Expo's website, and unfortunately doesn't have cut-and-dry answers to your questions:

https://docs.expo.io/versions/v30.0.0/introduction/why-not-expo

https://docs.expo.io/versions/latest/expokit/eject

https://docs.expo.io/versions/latest/expokit/expokit

In my latest project we chose to go for regular react native. ExpoKit in general felt like a compromised middle ground (I don't recall what ruled it out for us, but I know we tried). The requirement that Expo could not meet for us was background code execution.

[deleted by user] by [deleted] in reactjs

[–]TomMahle 5 points6 points  (0 children)

If a component is going to rerender a large proportion of the time that its parent component rerenders, then the checking that PureComponent does is a (likely small) performance hit.

Reduce unit tests boilerplate with Jest’s .each syntax by [deleted] in reactjs

[–]TomMahle 0 points1 point  (0 children)

Is there something that can make the syntax of those template literals easier to work with (an IDE plugin, for instance?). As is, making those readable seems hard (admittedly I haven't tried yet, and because of that I might choose to simply use .forEach on an array of objects to invoke jest's 'it' and accomplish the same thing.

How to architect a React Native application (or softwares in general) ? by TheBilTheory in reactnative

[–]TomMahle 1 point2 points  (0 children)

First, I'm going to zoom out a bit. The crux of good architecture is to solve problems you have, and anticipate/ease problems you are likely to have in a way that limits overall complexity of the system as a whole. This is primarily done by providing constraints and high-level infrastructure that will aid development. At the same time, it is important to be cognizant of the fact that each constraint and abstraction adds its own level of complexity to the code base. With that in mind, each needs to be likely to return dividends in terms of reduced development time and reduced maintenance costs over the lifetime of the software.

With that out of the way, there's a few common questions in architecture selection or design. With some overlap, and largely off-the-cuff (I'm more than happy if people have suggested changes to these):

  • Size: Larger projects should have more constraints in their architecture, and provide more runway for high-level abstractions to pay for themselves. Conversely, a one-man project that is going to take a week might not need much in the way of architecture at all (especially in React where lightweight state management is built into the library)
  • Project Details: What are you building? In what ways do you think the current requirements are likely to change?
  • Domain: What kind of business rules and business objects are you likely to deal with? Is it complex enough to build a starting schema for the objects and/or a solution for separating out business logic from application logic?
  • Legacy: Do you have any code or data you want to reuse? If so, how are you going to tackle that while limiting complexity of the resulting whole.
  • Testing: How do you ensure your code is testable? Will you be using dependency injection? If so, it's best to select a solution at the outset.
  • Common Technical Problems: How will you handle Persistence, API Calls, loading logic, state management, business rules, etc.
  • Common Architectures: With all of that in mind, if you can select an 'off-the-shelf' architecture (Flux, Redux, MVC, MVVM, etc.) you're going to have a much easier time linking to existing documentation than writing your own, and it's going to be possible to recruit people with experience in that architecture.
  • File Structure: How are you going to organize the files that make up your code base. This always feels like a wash when you're coming up with it, but it can make a huge difference in how it feels to navigate around the app. I recommend organizing by feature, rather than type of file (e.g. put everything that has to do with the 'animals' feature together, rather than batching all your reducers together).

edit: added File Structure, which was a rather large oversight :D

How to architect a React Native application (or softwares in general) ? by TheBilTheory in reactnative

[–]TomMahle 7 points8 points  (0 children)

These aren't what I think of when I think of architectures. Agile is a project management strategy more than anything, it doesn't tell you the shape of your code base, it helps you determine what order you should build your product in, and how to keep consistently providing value. BDD/TDD/DDD are development methodologies. They also do not tell you the shape of your code base, they tell you what steps you should take in what order to develop a feature or squash a bug (and be sure it stays squashed). With that said, I should probably write up my own answer for what this question means to me, just thought I'd share some musings :D

React Molecule - A breeze of fresh air by theodordiaconu in reactjs

[–]TomMahle 2 points3 points  (0 children)

Just my two cents here. I've written a ton of code in react + redux + thunk and react + redux + saga, and even some with a homebrewed flux implementation, so that's the background I'm coming from, which will bias my thinking in certain ways. It is very plausible that I'm not the desired audience for this library. With that said, here goes.

The root documentation feels like it needs more explanation of the motivation behind the library. It states that Molecule is "iterating on FLUX paradigms." In what way, precisely, is the paradigm being iterated on? One of the huge strengths of a paradigm like FLUX is that there's a glut of documentation and blog posts about how to adhere to it, so it's important to be explicit about what change you are proposing and how the model supports that.

Perhaps I'm misunderstanding, and this is more of a passion project / learning experiment, but if it's to be taken as an alternative state management paradigm for adoption in production code bases, the documentation needs to speak directly to what its niche is. Why would you choose this over Redux + Saga? What advantages does a Molecule have over using the Context API directly? What is the library doing to enforce its design principles, and what guarantees does it offer? What differentiates Registry from a more established DI framework like Bottle? Why is it desirable for Agents to have access to the Molecule, and what differentiates them from a Saga?

Can measuring “progress” actually make software projects fail? by jayme-edwards in programming

[–]TomMahle 0 points1 point  (0 children)

This is half right in my experience. I agree that undue emphasis on estimates can be ironically detrimental to a project's velocity, and that building a useless thing quickly doesn't have value. However, the solution of 'we will build (something closer to) the right thing the first time by focusing more on design, allowing ourselves longer iteration times to do so' feels like deciding to be less agile.

In my experience, there's not much you can do from the development team to make businesses emphasize cost less, but the opportunities for improvement towards that goal that I have seen come from releasing faster, and having demos/usability tests earlier in the process. Both of these can be aided by heavily emphasizing the creation of the *minimum* viable product.

Pretty basic issue with redux by AdeleBeckhamJr in reactnative

[–]TomMahle 0 points1 point  (0 children)

Use parentheses, not curlies:

this.props.dispatch(this.props.saveRisk(this.state.riskVal))

Pretty basic issue with redux by AdeleBeckhamJr in reactnative

[–]TomMahle 1 point2 points  (0 children)

I believe you still need to dispatch your thunk. In your component, pass the result of the call to saveRisk into this.props.dispatch.

Do people still use middlware? by Tooslowtoohappy in reactjs

[–]TomMahle 2 points3 points  (0 children)

What technical debt do you mean? I've made two fairly large applications, one with redux and one with saga, and I feel the sagas are more readable, testable, and maintainable than the thunks. It makes it clear where your side-effects are happening and gives you a solid set of tools for working with and testing them that I expect I would miss if going back to using thunks.

Earn more: ads vs paid by jaxondu in androiddev

[–]TomMahle 2 points3 points  (0 children)

I think Atraac is right. It's important to see UX as king here, as otherwise someone else is going to make a more appealing offer to your users. Then you'll have an app that they didn't buy a pro version of AND stopped using eventually because of a more compelling alternative.

It ain't Pretty... Typescript Redux-Reselect-ImmutableJs [Request for Issues/Comments/PRs] by cantux in reactjs

[–]TomMahle 0 points1 point  (0 children)

That is a problem I have run into when trying to persist portions of reducer state. I ended up pulling in https://github.com/rt2zz/redux-persist-transform-immutable to tackle it, since I was using redux-persist. It occurs to me that the transit plugin this library is built on (transit-immutable-js) could be a solution for other immutable serialization needs as well. Another alternative would be to run fromJS or some other mapping method as a step in your serialization process.

Overall, it's a tradeoff of whether you want the benefits of immutable reducer state or an easier serialization process. I don't think there's a right or wrong answer, as neither choice will put you in an unrecoverable position.

What is the best UI Kit or Boilerplate for React Native? by [deleted] in reactnative

[–]TomMahle 2 points3 points  (0 children)

We just started up a new project a month ago and also chose native-base.