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

Trouble with Importing Dynamically Generated Expo Styles into Iframe #246

Open
K1NZ54 opened this issue Jul 9, 2023 · 0 comments
Open

Comments

@K1NZ54
Copy link

K1NZ54 commented Jul 9, 2023

Hello everyone,

I am currently using the 'react-frame-component' in a project that involves both Expo and React Native, and I've encountered a specific issue.

To give you some context, I've integrated expo/next into my project, and it works great. However, when I attempt to inject dynamically generated Expo styles into the iframe, I run into issues. These styles simply do not get imported into the iframe, which prevents me from getting the desired rendering.

Let me provide an example. I'm trying to display a basic React Native component, such as a Switch, within the iframe. Here is the code snippet:

import React from 'react';
import { Switch } from 'react-native';
import IFrame from 'react-frame-component';

export default function App() {
  return (
    <IFrame>
      <Switch />
    </IFrame>
  );
}

The Switch component is not styled as expected due to the dynamic styles generated by Expo not being imported into the iframe.

I have tried multiple approaches to import the styles but to no avail so far. Has anyone come across this problem before, or have any suggestions on how to address it? Any assistance would be greatly appreciated.

Thank you for your time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant