A network switch and network hub look alike but the switch is technically more innovative than the hub. Network switches are small and they are considered to be hardware. They are mainly the hardware for a local area network.
This is so that they can put numerous computers organized on a network such as a business network or a school network. These are more costly than the other alternates because of how advanced they are.
The reason that these switches are technically more advanced is because they provide a way to preserve bandwidth. They convey messages only to devices that are linked. They forward the packets of data after examining them and then send them to where they need to be. This is better for performance and also preservation of data. Media converter, fiber optic media converter, sfp module and unmanaged ethernet poe switch are also some of the advanced networking devices.
A switch is just a high performance version of a hub which is why it is easy to complicate the two. While you can do what you want it may be a better deal if you have four or more computers to network.
Hubs are considered to be layer one devices while switches are considered to be layer two which is data link layer. These are both on the OSI model, but just on altered levels. Hubs are also inexpensive than switches but depending on what are essential for your system it may be easier to figure out what you need and what fits beat in your budget.