davidkpiano/react-redux-form

Imported JSX component text must be in PascalCase or SCREAMING_SNAKE_CASE

ALi-Hosseinzad opened this issue · 2 comments

The Problem

This component provides a warning with the following content:
Imported JSX component text must be in PascalCase or SCREAMING_SNAKE_CASE
It is enough for the first letters of all the components to become capital letters

Steps to Reproduce

"react-redux": "^7.2.2",
"react-redux-form": "^1.16.14"

Expected Behavior

warning: Imported JSX component text must be in PascalCase or SCREAMING_SNAKE_CASE
<Control.text model=".telnum" id="telnum" name="telnum" placeholder="Tel. Number" className="form-control" />
change to this :
<Control.Text model=".telnum" id="telnum" name="telnum" placeholder="Tel. Number" className="form-control" />

Actual Behavior

https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md

@ALi-Hosseinzad - This seems to be working as expected for me. Perhaps do you have the allowNamespace eslint option set for your code? If set to true (the default is false), then this warning will be ignored:

allowNamespace: optional boolean set to true to ignore namespaced components (default to false).

@ALi-Hosseinzad I'm glad you could get some support w/ this software, but it's in archive status and has not been supported for years. The consensus now is that local form state, not Redux, is the best state to use for for forms. Reference (README.md for similar project): https://github.com/redux-form/redux-form

One of the most popular local form state libraries is Formik, I've used it for a couple projects and highly recommend it - it's actively developed and very easy to use.

Some institutions are still using React-Redux-Form as a way to slip in experience with Redux, but from what I gather using Redux for forms these days is highly irregular.