Skip to content

Instantly share code, notes, and snippets.

@hbjydev
Created March 8, 2024 20:15
Show Gist options
  • Save hbjydev/79e74aa81e701e3bc928b6d83720b46d to your computer and use it in GitHub Desktop.
Save hbjydev/79e74aa81e701e3bc928b6d83720b46d to your computer and use it in GitHub Desktop.
export const Base = ({ children }) => (
<div className="something">
This is my base
<NavLinks />
{children}
<Footer />
</div>
);
import { Base } from './base';
export const IndexRoute = () => {
return (
<Base>
This content is inside Base, but only on index.tsx
</Base>
);
}
import { Base } from './base';
export const SettingsRoute = () => {
return (
<Base>
This content is inside Base, but only on settings.tsx
</Base>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment