Our navigation is coming along pretty well so far.
We are able to navigate from the log and form over to the employee list.
I would now love to start working on the employee list itself and start showing employees to our users.
But you'll keep in mind that we don't actually have the ability to add any employees yet.
So what would we really be showing here.
Right.
So I think that the first thing we really have to work on is give our users the ability to create a
new employee and save it to our back end database.
Now I want to give you a quick reminder on what that component is going to look like.
So inside of our employee list we should have some buttoned up in the header up here that will take
the user over to a new form where the user should be able to create a new employee.
They should build clicks save and then go back over to the employee list automatically.
So that's what we really want to have happen here.
Step number one is to somehow get a out of button to appear in the header of our employee list component
to do so.
We're going to add a couple of props to our scene responsible for showing the employee list inside of
our rodder file.
So here's the scene right here that's showing our employee list in order to customize the header that
shows up whenever we see the scene.
We're going to pass some additional props to the scene itself so I can get myself a little bit of space
to type by noon lining some of the props here.
Like so and then we're going to add on to additional props to this thing.
The first thing that we're going out on is a prop called right title right.
Title is going to be a string that will be displayed on the right hand side of our Hetter any time we
are looking at the employee list component.
I'm going to give this the text app like so.
So pretty straightforward.
The user is going to see something and says add and I think they're going to recognize that this is
going to be used to add a new employee.
Then right underneath it we're going to add one other prop as well just specifying right.
Title right here doesn't really do anything and doesn't really link up the different screens or application.
So in order to make sure that we actually have the ability to navigate between different scenes we're
going to add on a callback function to this thing.
So we're going to out on a callback by specifying another product called on right.
This will be a callback function.
They'll be executed any time the user taps on the right hand side button.
Now we will eventually add some code inside of here to navigate over to the employee create form.
But right now let's just do a console log that says right like so I will test this out inside the browser
and make sure that the console log or the test out in the simulator can make sure that the console log
appears inside of our browser console that is hooked up in debugger mode.
So I've already got my debugger handy right here.
Here is my simulator.
I'm going to refresh and log back in
so a log in and now I should see the text ad appear on here on the right and I definitely do.
And if I tap it I see the console log right appear in my console in the browser.
Awesome.
Just what we need.
So let's continue on the next section and we're going to get started on our employee forum and hook
it up to this ad button.