Skip to content

Instantly share code, notes, and snippets.

@nitayneeman
Created January 10, 2021 20:47
Show Gist options
  • Save nitayneeman/8595652a240ed64b4cd5770780d04df3 to your computer and use it in GitHub Desktop.
Save nitayneeman/8595652a240ed64b4cd5770780d04df3 to your computer and use it in GitHub Desktop.
import FirstComponent from './FirstComponent.client.js';
import SecondComponent from './SecondComponent.client.js';
function MyServerComponent(props) {
const shouldDisplaySecondComponent = ...; // Some logic
return shouldDisplaySecondComponent ? <SecondComponent/> : <FirstComponent/>;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment