I have a basic Hyperstack application and would like to style it.
Can I integrate with React-Bootstrap and is that a recommended approach, or should I rather look at other frameworks (e.g. Material UI?)
Any pointers to docs or sample code would be much appreciated!
Yes, it is very simple to integrate ReactBootstrap, MaterialUI, SemanticUIReact or ANY of the other component libraries with Hyperstack
These libraris give you Buttons, Typography, Modals and loads of ther useful UI tools which compose your UI. All of the examples listed about are React based, so each Component (let's say
Buttonis a React Component).The advantage of using Hyperstack means that you write your entire front end in Ruby and use these library Components as if they were Ruby classes.
For example, in ReactBootstrap, the following JSX:
Would become in Ruby
And if we looked at a slightly complex example, a Button with loading state:
The JSX example from the ReactBootstrap website is:
The identical code in Ruby using Hyperstack (with an added HTTP.get):
Installing ReactBootstrap into Hyperstack is very simple. Just follow these instructions: https://hyperstack.org/edge/docs/dsl-client/components#importing-javascript-or-react-libraries
The same approach is true for any React library used in your Ruby code.