Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(paths): use directory-relative paths #29

Merged

Conversation

mikehardy
Copy link
Collaborator

If this template is used to init a project, then the app directory itself
is moved, the components inside app lose their ability to resolve and lint:types
no longer works

If I use directory-relative paths, everything appears fine

Related: invertase/react-native-firebase-authentication-example#3

This was the only change I needed in this template when layering that one on top

If this template is used to init a project, then the app directory itself
is moved, the components inside app lose their ability to resolve and lint:types
no longer works

If I use directory-relative paths, everything appears fine
@LunatiqueCoder
Copy link
Owner

While I really liked the absolute modules, I always found them problematic for mobile+web with React Native. :( So removing them for good sounds like a good idea. Thank you, Mike!

@LunatiqueCoder LunatiqueCoder changed the base branch from master to develop November 27, 2021 06:06
@LunatiqueCoder LunatiqueCoder added the bug Something isn't working label Nov 27, 2021
@LunatiqueCoder LunatiqueCoder merged commit ed61386 into LunatiqueCoder:develop Nov 27, 2021
@mikehardy
Copy link
Collaborator Author

I actually have a small follow on question - what are all the package.json files in the sub-directories for? those don't seem necessary or useful?

and the src/react-app-env.d.ts file ? that seems like it should be in types if needed?

I'm iterating on this really rapidly now for both the react-native-firebase auth example template and 3 different work projects (all using this one) so this is a period of rapid polishing/cleaning as they all go through their initial phases of development - once the basic scaffolding is up and clean in all of them I'll be really quiet probably :)

@mikehardy mikehardy deleted the @mikehardy/relative-paths branch November 27, 2021 13:39
@LunatiqueCoder
Copy link
Owner

LunatiqueCoder commented Nov 27, 2021

I actually have a small follow on question - what are all the package.json files in the sub-directories for? those don't seem necessary or useful?

Feel free to use them however you want or remove them (from Luna as well). Here's why and how I used them:

and the src/react-app-env.d.ts file ? that seems like it should be in types if needed?

That's useful for react-scripts. Should stay where it is in order to avoid errors. You can head to this blog post for more info: https://www.newline.co/@dmitryrogozhny/how-to-start-new-react-application-with-create-react-app-and-typescript--4298e606#create-react-app-types-declaration-file

I'm iterating on this really rapidly now for both the react-native-firebase auth example template and 3 different work projects (all using this one) so this is a period of rapid polishing/cleaning as they all go through their initial phases of development - once the basic scaffolding is up and clean in all of them I'll be really quiet probably :)

Yeah, I'm already on one of my vacations 🥳 That's why I'm a bit quiet, but I'm definitely keeping an eye on Github when I can. I'm very happy that we're helping each other and I'm really wishing you Happy Holidays in case we don't keep in touch. 🍾

@mikehardy
Copy link
Collaborator Author

Happy vacation time :-) - and thanks for posting that up, I had no idea what that stuff was but now I have plenty more to learn ;-). Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants