It is confusing to me that =
seems to assign values to variables as it usually does in other languages, but what does :
do?
I feel like it is assigning functions or some other stuff to a variable.
What exactly it is doing?
Here is an example:
import React from 'react';
const MyComponents = {
DatePicker: function DatePicker(props) {
return <div>Imagine a {props.color} datepicker here.</div>;
}
}
function BlueDatePicker() {
return <MyComponents.DatePicker color="blue" />;
}
The colon is after DatePicker