Skip to content

Trouble with Importing Dynamically Generated Expo Styles into Iframe #246

@K1NZ54

Description

@K1NZ54

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions