Skip to content

Passing props through remote component #1

Description

@qlbp

Hi there, is there a way to pass props to the remote component, for instance:

//in host/src/Host.jsx
function Host(){
  const world = "world!";
  return <RemoteComponent url="url" scope="scope" module="./App" name={world}/>;
} 
export default Host;

//in remote/src/App.jsx
function App(props) {
  console.log(props);
  return <h2>Hello {props.name}</h2>;
}
export default App;

Currently I believe this would just render Hello as the props object "sent" to App is empty.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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