Hi I am just finishing the Markdown Previewer challenge, which is the last I have to do as part of the Front End Library challenges and I came across a dilemma. As the challenge is not that extensive, I am trying to implement a few extra features like the ability to change font/font size in the editor. The structure of my app goes:
...
<Editor various props/>
<Previewer various props/>
...
I am following the single source of state principle, with my app containing all the state data and both the Editor and Previewer as functional stateless components. Therefore I have to pass the Editor component the font data and the methods to change them as props. Here is my dilemma: is it okay to have these methods (in the app) include the font details as part of the state, or is there a better way of doing this.
Note: None of this font changing code has been implemented so there is no link to share.