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

React-Native support #20806

Closed
jeremymeng opened this issue Mar 11, 2022 · 5 comments
Closed

React-Native support #20806

jeremymeng opened this issue Mar 11, 2022 · 5 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. Epic

Comments

@jeremymeng
Copy link
Contributor

jeremymeng commented Mar 11, 2022

This tracks investigation and development towards supporting React Native in JS SDK libraries. Work includes

  • Necessary SDK code changes
  • Samples and documentation for customer
@ghost ghost added the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Mar 11, 2022
@jeremymeng jeremymeng self-assigned this Mar 11, 2022
@jeremymeng jeremymeng added the Client This issue points to a problem in the data-plane of the library. label Mar 11, 2022
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Mar 11, 2022
@azure-sdk
Copy link
Collaborator

Label prediction was below confidence level 0.6 for Model:ServiceLabels: 'Cosmos:0.2598161,Storage:0.17497268,Azure.Core:0.08992475'

@dittmarconsulting
Copy link

Hi all,

I'm not sure why there hasn't been any development on that. RN is now so widespread that that would make perfect sense.

In my current project, I have to implement nodejs-mobile-react-native just to get @azure/identity working.

I really hope there will be much interest in this integration.

@jeremymeng
Copy link
Contributor Author

@dittmarconsulting thank you for the interests! I am looking into this, currently investigating what's needed to be able to use @azure/app-configuration package in react-native.

Thank you for the pointer to nodejs-mobile-react-native. Would you mind explaining in more details what the package does and how you use it with @azure/identity?

@dittmarconsulting
Copy link

Hi @jeremymeng,

Sorry for the delay.

I have successfully integrated azure-iot-device-mqtt and azure-iot-device into my RN app by installing nodejs-mobile-react-native.

It creates a NodeJS environment within the RN app including its own node_modules folder and package.json file.

The entry point is the main.js file where I hooked up the iot stuff because it's a node env like that

rn_bridge.channel.on('send-image-data', dataObj => {
  const data = JSON.stringify({
    ...dataObj,
    deviceId: 'iot-nextjs',
  });
  const message = new Message(data);
  mqttClient.sendEvent(message, error => {
    if (error) {
      rn_bridge.channel.post('system-message', `Send error ${error}`);
      return;
    }
    rn_bridge.channel.post('system-message', 'Message sent!');
  });
});

The only downside is the app size that will include the extra size of the node_modules folder but I think that can be managed by removing unused modules and some build tool to convert the packages into one small JS file.

I hope that helps.

Copy link

Hi @jeremymeng, we deeply appreciate your input into this project. Regrettably, this issue has remained inactive for over 2 years, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 19, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Apr 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. Epic
Projects
None yet
Development

No branches or pull requests

3 participants