Skip to content

Passing props through remote component #1

@qlbp

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.

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