The last thing we need to think about is how a user is going to show a react component.
So let's imagine that we've got some kind of app component.
And maybe they return in each one.
That says component like so.
Now, if a user wants to show this component on the screen, remember to show a map component, we write
out a app inside of a jazz element.
So in this case, to show this app component thing, a user would write out show up inside of Jesus
tags.
So now that's going to be treated as a jazz element and will be rendered onto the screen accordingly.
So we don't really need to add in any extra case or anything like that to handle showing a custom component.
It's just going to work as long as the user writes it out in the same way that they would usually write
out a very simple element.
Well, that's pretty much it for our show function now throughout all of our code, let's say we go
down to the next code so we can show as often as we wish.
So I could do a another show with app.
I can even maybe show a div.
That wraps.
Two copies of the app or maybe even more.
And we'll show however many copies you want.
This definitely looks like a pretty good solution.
There's just one very small thing about it that is a little bit awkward right now.
You might notice that if I don't show anything inside of the second code, Ed.
And it's going to fall back to showing whatever was shown in the previous code, so so the one up here,
remember, we are now doing that kind of cumulative code execution.
So the second code cell is running all the code inside of here, plus all the code from the previous
cell.
Now, I don't know about you, but just showing the result or whatever we are showing from the previous
cell inside this next one is just a little bit strange.
There might be some scenario where a user wants to write out a little bit of code inside of your but
not show anything at all.
And if we end up showing whatever the result was from the previous component.
Well, again, just a little bit unexpected.
So I want to set up one last little challenge for us.
This one is going to be a little bit challenging.
I want to say that if a user calls show inside of a previous code cell, I do not want that show to
be reflected inside of subsequent code cells.
So in other words, right now we are calling show inside of code cell one.
I don't want to show the result of that inside of the preview window of code cell two down here.
I only want to display the app component inside of the preview for Code Cell one.
Now, this is going to be challenging because at present we are very much joined together the contents
of these two files, so we can have to figure out some way to say, well, if this show statement is
coming from an earlier code, so don't actually show anything at all.
There's definitely several ways of implementing this.
Let's take a look, as usual, at a couple of different possible solutions in the next video.