Skip to content
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.

Imported JSX component text must be in PascalCase or SCREAMING_SNAKE_CASE #1230

Open
ALi-Hosseinzad opened this issue Dec 29, 2020 · 2 comments

Comments

@ALi-Hosseinzad
Copy link

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

@yanigisawa
Copy link

@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).

@averyfreeman
Copy link

@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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants