Closed davekellam closed 7 years ago
I guess the current partials aren't really state aware. Trying to think about the maintenance approach here... maintain styling and structure of components at component level with strict data structure or further up the WordPress chain with the loop and built-in WordPress stuff.
hey @davekellam i would vote to return the data array as opposed to html. Separation of content and design.
If it makes sense in the future we might have a function that returns data and then a function that builds html... but the two shouldn't be mixed, IMO.
Yeah, I agree... it floats away from some traditional WordPress stuff, but it separates the front/back-end more. In theory just having the data returned would allow you to switch between front-end solutions more easily.
Closing in favour of #37
@kpettinga do you have any thoughts on separation of content/display here? Happy to use the partial/components here. What makes more sense as a helper... returning a data array or structured html?