README.md in react-rails-3.1.0 vs README.md in react-rails-3.1.1
- old
+ new
@@ -66,20 +66,17 @@
- [Camelize Props](#camelize-props)
- [Changing Component Templates](#changing-component-templates)
- [Upgrading](#upgrading)
- [2.7 to 3.0](#27-to-30)
- [2.3 to 2.4](#23-to-24)
-- [Other features](#other-features)
- - [Replace `null` with `undefined` in props](#replace-null-with-undefined-in-props)
- [Common Errors](#common-errors)
- [Getting warning for `Can't resolve 'react-dom/client'` in React < 18](#getting-warning-for-cant-resolve-react-domclient-in-react--18)
- [Undefined Set](#undefined-set)
- [Using TheRubyRacer](#using-therubyracer)
- [HMR](#hmr)
- [Related Projects](#related-projects)
- [Contributing](#contributing)
-- [Supporters](#supporters)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
After reading this README file, additional information about React-Rails can be found in the Wiki page:
@@ -529,10 +526,11 @@
```js
// Replaces calls to `ReactUJS.useContext`
ReactUJS.getConstructor = ReactUJS.constructorFromRequireContext(require.context('components', true));
```
+
## Server-Side Rendering
You can render React components inside your Rails server with `prerender: true`:
```erb
@@ -801,30 +799,10 @@
For the vast majority of cases this will get you most of the migration:
- global find+replace `React.Prop` -> `Prop`
- add `import PropTypes from 'prop-types'` (Webpacker only)
- re-run `bundle exec rails webpacker:install:react` to update npm packages (Webpacker only)
-## Other features
-
-### Replace `null` with `undefined` in props
-
-React-Rails converts `nil` to `null` while parsing props from Ruby to JavaScript. Optionally, you can configure React-Rails to parse `nil` values to `undefined` as per the following:
-
-```ruby
-# config/application.rb
-module TheAppName
- class Application < Rails::Application
- # ...
- # Set to true to convert null values in props into undefined
- config.react.null_to_undefined_props = true
- # ...
- end
-end
-```
-
-More information in: [discussion#1272](https://github.com/reactjs/react-rails/discussions/1272).
-
## Common Errors
### Getting warning for `Can't resolve 'react-dom/client'` in React < 18
You may see a warning like this when building a Webpack bundle using any version of React below 18. This warning can be safely [suppressed](https://webpack.js.org/configuration/other-options/#ignorewarnings) in your Webpack configuration. The following is an example of this suppression in `config/webpack/webpack.config.js`:
@@ -877,10 +855,10 @@
By contributing to React-Rails, you agree to abide by the [code of conduct](https://github.com/reactjs/react-rails/blob/master/CODE_OF_CONDUCT.md).
You can always help by submitting patches or triaging issues. Even offering reproduction steps to issues is incredibly helpful!
-## Supporters
+# Supporters
The following companies support the development of this and other open-source projects maintained by ShakaCode by providing licenses to the ShakaCode team. ShakaCode stands by the usefulness of these products!
<br />
<br />