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
Not so much an issue as a feature request, but I am looking for a clean natural way of re-using JS based React components alongside ruby based JS components.
In trying to get this to work, I have been using React::NativeLibrary as a base class then importing the JS component but this does not work as React::NativeLibrary expects a JS library not a react component.
The code I would like to write is something along these lines:
class TimeAgo < React::NativeLibrary # something to import a JS based react component (*react timeago in this example) end
Not so much an issue as a feature request, but I am looking for a clean natural way of re-using JS based React components alongside ruby based JS components.
In trying to get this to work, I have been using React::NativeLibrary as a base class then importing the JS component but this does not work as React::NativeLibrary expects a JS library not a react component.
The code I would like to write is something along these lines:
class TimeAgo < React::NativeLibrary
# something to import a JS based react component (*react timeago in this example)
end
And then to use this something like:
TimeAgo(date: "Jan 1, 1990") {}
Many thanks!
The text was updated successfully, but these errors were encountered: