$ rails g model User
belongs_to
has_one
I wrote this as a reference for myself because some of the property names are non-obvious, and there are a number of relevant special properties, and there is no central concise listing of them all in GSAP Docs, other than (in longer form) on the CSSPlugin page.
...are all supported, with hyphenated-names
becoming camelCaseNames
. Non-animatable properties are also supported but they will be set at the beginning of the tween.
Special mentions:
When using react-rails for an internationalized app it makes a lot of sense to use i18n-js for translations, so that you can reuse the the strings from your rails app's .yml files (and all the tooling & services that exist around that).
When you use the prerender feature of react-rails you face 2 problems:
translation.js
& i18n.js
from i18n-js need to be loaded inside the server-side JS prerendering processes, which is achieved by loading them inside the components.js
.locale
of each HTTP request. This is done by adding a custom renderer and using the before_render
hook to configure i18n-js accordingly for each render call.gem 'browserify-rails', '1.5.0' # until fix: https://github.com/browserify-rails/browserify-rails/issues/101
gem 'react-rails'
Browserify-rails allows to use browserify within assets pipeline. React-rails is here only to allow to use #react_component
(and thus, prerendering).
Note that jquery-rails
can be removed from Gemfile, the npm version of jquery
and jquery-ujs
will be used instead.