You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have encountered several different situations where I would like to fetch get a simple string from djedi-react, without using the Node element. There might already be ways to do this but it does not seem like they are very well documented nor as easy to use as the good old <Node uri=""></Node> in react components. Usecases I have found for this is for example using a djedi value as the title or entry in a select dropdown, currently it is fetched but simply coerced into a [object Object] string.
The text was updated successfully, but these errors were encountered:
And in your field components you would check the type of the prop. Either it would be a string or an object (if it's a node). If it's a node you wrap with DjediContent, otherwise you just pass the string.
Ah ok, thanks! It feels like this should probably be part of djedi-react itself as it is a quite common issue I encounter, and the helper while nice feels a bit like an added layer of indirection.
I have encountered several different situations where I would like to fetch get a simple string from djedi-react, without using the
Node
element. There might already be ways to do this but it does not seem like they are very well documented nor as easy to use as the good old<Node uri=""></Node>
in react components. Usecases I have found for this is for example using a djedi value as the title or entry in a select dropdown, currently it is fetched but simply coerced into a[object Object]
string.The text was updated successfully, but these errors were encountered: