Hey y’all, does anyone know if there’s a way to access the displayName
property of a ReasonReact component? I was looking to automate a styleguide I’m building for a application, and I was hoping to pull the name directly from the component itself rather than have to duplicate the name.
To be honest, I’m not sure if this is the right way to approach this problem either, so I’m happy to hear other examples of how I could approach it!
To give you an example of what I’m trying to do, I have this Strings.re
where I’m defining the text for my app. I currently have something like this:
module Wrapper = {
let title = "Wrapper";
let description = "a general purpose wrapper that applies a max-width and some padding. Meant to be used around the whole page";
}
...
But would like to have something like this:
module Wrapper = {
let title = Wrapper.displayName;
let description = "a general purpose wrapper that applies a max-width and some padding. Meant to be used around the whole page";
}