Yeah, it looks pretty good - I like the retro feel.
As to the code, it looks pretty good too. There are a few things that caught my attention:
const editorMaximised = () => {
return {
type: EDITOR_MAXIMISED
};
};
You’re going to see most people use the implicit return here, like:
const editorMaximised = () => ({
type: EDITOR_MAXIMISED
});
// or
const editorMaximised = () => ({ type: EDITOR_MAXIMISED });
Note the parentheses around the return object - necessary because you can’t begin an expression with a curly base or it assumes it is a code block.
There are several places yout could do this, including things like Header and Footer.
This isn’t wrong per se, just that to some eyes it may seem a little dated and cumbersome.
This seems overkill to me:
React.useEffect(() => {
if (props.isMaximised) {
setMaxClass("maximised");
} else {
setMaxClass("");
}
}, [props.isMaximised]);
Couldn’t you just have:
<div className={`markdownEditor ${props.isMaximised ? 'maximised' : ''}`}>
or even this might work (I can’t remember):
<div className={`markdownEditor ${props.isMaximised && 'maximised' }`}>
You could even store that in a variable to make your JSX cleaner:
const wrapperClassString = `markdownEditor ${props.isMaximised ? 'maximised' : ''}`;
You won’t need component state unless you need to persist it across component renders. I don’t think you need to here because it is just based on an input prop. In general, it’s good to make your components as dumb as possible, make them idempotent. Some components will need to have state, but avoid it where possible.
In general, there seem to be a few things here being handled in redux that could maybe be handled in local state. But I understand that you have a new shiny toy and want to use it. In reality, an app like this, I probably wouldn’t even bother with redux. The same with using state where you didn’t need it - it’s still a good learning opportunity.
<React.Fragment>
// ...
</React.Fragment>
Now, this can be simplified to:
<>
// ...
</>
Still, it looks good, all in all. Have fun on the drum machine.