Skip to content

Instantly share code, notes, and snippets.

@DanyF-github
Created January 8, 2021 10:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DanyF-github/18f0bad6e1825c0cf20d852e0dee4f98 to your computer and use it in GitHub Desktop.
Save DanyF-github/18f0bad6e1825c0cf20d852e0dee4f98 to your computer and use it in GitHub Desktop.
// client/src/pages/StudentPage.tsx
import React from 'react';
import { StudentsList, StudentForm } from '../components/Students';
const Students = () => {
return (
<>
<h1>Students</h1>
<StudentForm />
<StudentsList />
</>
);
};
export default Students;
// client/src/pages/index.tsx
...
import StudentPage from './StudentPage';
function Pages() {
return (
<Router>
<Navigation />
<div id="roots" className="p-2">
...
<Route path="/students" exact component={StudentPage} />
</div>
</Router>
);
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment