cssblock for the style tab, but for metadata. Probably needs a whole separate PR just to set that up.
editPage.handleTextChangesetting the state (which updates the CodeEditor's props) and
codeEditor.componentDidUpdateis causing the CodeMirror instance to seemingly lose all its state wrt code marks
/newto local storage, or to save the brew before printing to make sure that the last set of changes are still in there.
homebrew.jsx(or wherever), then
_.mergethat with the result of
homebrew.jsx), then every Brew, passed to any Route, should be guaranteed to have all of the default Brew properties.
isEdit()logic out of
editorPage. I have a couple comments on the PR.
Basic gist is we should pass in props containing the unique parts of each page, rather than just passing in a label ("edit" or "new" or "homepage") and making the editorpage have to sort it all out. "Sometimes we think about components as being “special cases” of other components. For example, we might say that a WelcomeDialog is a special case of Dialog.
In React, this is also achieved by composition, where a more “specific” component renders a more “generic” one and configures it with props:"