eslint-plugin-react
react-admin
eslint-plugin-react | react-admin | |
---|---|---|
67 | 65 | |
8,821 | 24,029 | |
0.4% | 0.7% | |
8.4 | 9.9 | |
4 days ago | 6 days ago | |
JavaScript | TypeScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
eslint-plugin-react
-
Interesting Bugs Caught by ESLint's no-constant-binary-expression
> [1] https://github.com/jsx-eslint/eslint-plugin-react/blob/maste...
From what I remember, being able to pass children as a prop is considered a side-effect of an implementation detail, that breaks the expected abstraction. There really isn't any reason to use it, and I think there's a chance it may even confuse the virtual dom diffing?
Also this would prevent you from accidentally doing both at once:
Is it me?}>
-
Speeding up the JavaScript ecosystem – Polyfills gone rogue
I try to focus on the issues rather than individuals, but the root of the problems in the listed eslint plugin libraries points to ljharb.
If you do some simple digging into these libraries, you will find that these types of commits are quite common within them.
https://github.com/jsx-eslint/eslint-plugin-react/commit/e1d...
https://github.com/jsx-eslint/jsx-ast-utils/commit/bad51d062...
https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/commit/...
He would rather see the download count of these polyfill libraries https://github.com/ljharb/ljharb#projects-i-maintain increase, compared to assessing the health of the JavaScript ecosystem.
-
The Best ESLint Rules for React Projects
An obvious pick for React projects, but eslint-plugin-react along with their plugin:react/recommended rule set is a must. This will give you some sensible rules such as requiring a key to be specified in JSX arrays. eslint-config-airbnb is another good (if a bit loose) base rule set on top of eslint-plugin-react to start from.
-
Avoid "&&" Operator for Conditional Rendering in React
If you already have the eslint-plugin-react installed, you can enable the following rule.
-
Create React UI Lib 1.1: Ladle and ESLint
You can also add ESLint now (props to @femincan for the suggestion). It comes with recommended settings for these plugins: typescript, prettier, react, react-hooks, jsx-a11y.
- Confusion over one of the examples of the jsx-no-literals linting rule
-
What's weirdest webdev practice in your company?
Also for what it’s worth, there’s a React ESLint code rule that can enforce this behavior either way for Component props - I’m not in front of a code base atm, but I wonder if my preference for the syntax above is influenced by a popular linting preset like AirBnB which enforces this rule? https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-curly-brace-presence.md
-
Removing Default React Imports. For a Cleaner Code
The missing piece is on this page, in a small note at the end of the page: the eslint rule to disallow missing React when using JSX.
-
Ask HN: What are you predictions for 2023?
Thanks for weighing in, that's good to know. After wondering if this could be auto-refactored, I came across https://github.com/jsx-eslint/eslint-plugin-react/blob/maste..., will definitely have to give that (with `--fix`) a try in the new year and see if I can get the team on board! – desire for typescript being a compelling factor.
Personally I do like the non-destructured `props.abc` throughout component code, really helps clarify at a glance where something is coming from, whether it's locally or externally defined, etc. Code style is an endless exercise in compromises/opinions though, even _with_ tools like eslint and prettier.
-
Recommended React Hooks Convention
eslint-plugin-react react/hook-use-state
react-admin
-
Ask HN: Does Anyone Use a "Closed Core" Software Model?
> "Are there examples of companies adopting this model?"
Many examples across the industry:
- Autodesk AutoCAD (closed) + Plugins/Addons (many open)
- MS Windows (closed) + Many 3rd party programs (open)
- Github (closed) + Github Actions (open)
- Npm (closed) + Npm modules (mostly open)
> "What are the potential benefits or pitfalls?"
Benefits:
- Harder to replicate, the company gets to keep the "secret sauce" a secret
- Opening up a way to "extend" the platform means 3rd party developers add value to your system
- The core isn't open, so less effort is required to maintain compare to OpenSource
Pitfalls:
- Closed-source is hard to verify, company is essentially saying "trust me bro"
- Less innovation, as user's can't contribute to the core
> "How does it impact community engagement and software adoption?"
There's hardcore FOSS advocates that will hate anything not fully open. But a business has to make money and protect it's IP, having a "closed core" is one way to do that and ensure a sustainable business model.
Another approach is the opposite, open-core + closed-premium-addons. An example of this is "React Admin"
- Open Core -> https://github.com/marmelab/react-admin
- Premium Modules Offering -> https://react-admin-ee.marmelab.com/
-
React Component Libraries
Official Website: https://marmelab.com/react-admin/
-
Building an Admin Console With Minimum Code Using React-Admin, Prisma, and Zenstack
React-Admin is a React-based frontend framework for building admin applications that talk to a backend data API. It offers a pluggable mechanism for easily adapting to the specific API style of your backend.
-
New client-side hooks coming to React 19
With these features, data fetching and forms become significantly easier to implement in React. However, creating a great user experience involves integrating all these hooks, which can be complex. Alternatively, you can use a framework like react-admin where user-friendly forms with optimistic updates are built-in.
-
33 React Libraries Every React Developer Should Have In Their Arsenal
31.react-admin
-
I absolutely despise front-end work and styling, (and JS too), coming from a C++ / Java background, what would be a good framework or anything really to make it as painless as possible for me to build a front end.
For the admin panel, or basically anything with basic crud operations, take a look at https://marmelab.com/react-admin/. Most frontend devs don't like it, since it limits you somewhat in customization, but at the same time, it is very easy to grasp for someone coming from a backend dev profile, who just wants a crud UI. It even has a guesser template that proposes an initial screen layout based on the response of your api, which you can then copy-paste and finetune. It is really made to make quick admin crud ui's.
-
Anatomy Of A Profitable Open-Source Project
We’ve developed a business based on an open-source platform called react-admin. Embracing the open-source spirit, we’re sharing the key performance indicators of this business. We hope it will help other open-source developers build their own business.
-
An Overview of 25+ UI Component Libraries in 2023
React-Admin: As the name suggests, this component library is targeted at building administrator interfaces for B2B (business-to-business), for example, managing users in your system. It is based on Material design and has a neat feature where you can let it “guess” your list views by providing a sample API endpoint for your data.
- Launch HN: Refine (YC S23) – Open-Source Retool for Enterprise
-
Pros and cons of off-the-shelf solutions for creating a control panel
- We want a solution that creates CRUD (create, read, update, delete) quickly and requires minimal effort. - We want to be able to create some sort of complex interface if the task requires it. - We make cool, beautiful projects, so we want a visually pleasing solution. - We want the solution to be independent of the language on the back-end, because, for example, we started with PHP, Laravel, but over time node.js, Go appeared in the stack. In short, we want fast, beautiful and custom. We've had time to poke at various off-the-shelf solutions that we've been advised. They're good, but: - they are created specifically for some frameworks / languages like laravel, node.js - they can only generate CRUDs with a rigidly defined structure, where you can't implement or customize anything of your own. - they can't be styled Here's what we've been looking at Control Panels for Laravel: https://demo.backpackforlaravel.com/admin/dashboard Not a very pretty solution in our opinion. And the promo page has nice screenshots, not the demo "well such". https://orchid.software/en/ Not particularly functional, but neatly done https://nova.laravel.com They have a beautiful, but rigidly set strutkrua, you can not create castmon interfaces, stylize them. Just do CRUD and that's it. And it's paid https://filamentphp.com/ Analog to Nova, with essentially the same problems. For node.js: https://adminjs.co Nice promo, and the demo is way behind As standalone dashboards: https://strapi.io/ Very cool, but for other purposes. It's more of an entity builder with an interface and API https://pocketbase.io/ Similarly, it's an entity builder with an interface and API https://directus.io/ This is a backend builder. https://filamentphp.com/It is purely for php, you can't customize styles, you can't create your own interfaces. It is possible to create only tables and forms by template, and we remember that we want flexibility, independence from the language and the ability to create their own interfaces and customize them https://flatlogic.com This is also more of a backend builder. Direct competitors: https://github.com/refinedev/refine https://marmelab.com/react-admin/is probably the best solution that is currently on the market, they have been developing for a long time, they are our favorite. To the disadvantages we considered the following points: quite an old project, and somewhere the technology is already outdated, unsympathetic interface, old UI libraries. Huge documentation, it’s simply to create CRUD but hard to work without immersion. After all this there is only one conclusion: you need to do it yourself....
What are some alternatives?
stylelint-config-prettier - Turns off all rules that are unnecessary or might conflict with prettier.
tailwind-dashboard-template - Mosaic Lite is a free admin dashboard template built on top of Tailwind CSS and fully coded in React. Made by
berry - 📦🐈 Active development trunk for Yarn ⚒
Refine - A React Framework for building internal tools, admin panels, dashboards & B2B apps with unmatched flexibility.
prop-types - Runtime type checking for React props and similar objects
AdminJS - AdminJS is an admin panel for apps written in node.js
javascript - JavaScript Style Guide
refine - Build your React-based CRUD applications, without constraints. [Moved to: https://github.com/refinedev/refine]
razzle - ✨ Create server-rendered universal JavaScript applications with no configuration
mantine - A fully featured React components library
eslint-plugin-prettier - ESLint plugin for Prettier formatting
appsmith - Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.