microsoft / microsoft/react-native-windows
The new arch app template should make it easy and clear to choose where the bundle comes from
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 17.3k
- Forks
- 1.2k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 33
Description
Summary
Bundles can be loaded from anywhere, but "built-in" we offer loading from:
- Metro (typically only in debug)
- An asset in an appx (via
ms-appx://, default for UWP) - A string resource in an assembly (via
resource://mylib.dll/) - A file on disk (via
file://, default for Win32)
While obviously apps are on their own for code-push scenarios (our template won't hook you up with any of that), we really should make it both clearer what the default is in our template, but also easier for app developers to switch to meet their needs
Motivation
After getting the #12569 alerts for dynamically loading libraries for their resources, I wanted to see where (if anywhere) we were actually using this in our templates or examples. I think we should be lot clearer about the options and their trade-offs.
Basic Example
I can imagine scenarios where developers want to store their JS bundle in their dll, mildly obfuscating some of their code or reducing the number of files they ship.
I can also imagine scenarios where developers don't want their JS bundle in their dll because that means you have to re-build and re-deploy the native code to get JS updates.
I can imagine scenarios where you want the benefits of both at different times for different reasons.
Open Questions
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the new architecture app template and its bundle-loading configuration. Review how the template currently selects Metro, appx, resource, or file sources; done should make the default explicit and provide clear, easy-to-change guidance for choosing another source.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native
- Domain
- developer-experience
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100