Comments (4)
hey @patorjk, thanks for the updated version and for the pr. Looks good! But it seems like the facebook team hasn't been merging in eslint related PRs for a while now, so fingers crossed 🤞
from react.
This is a valid point
from react.
+1 up
from react.
Thanks for putting that rule together! I was looking for a rule like this and stumbled upon this issue. I played around with it a bit and noticed it doesn't identify certain cases, examples:
useState(a ? b : c());
useState(a() > b);
useState(a() || b);
I made an updated version here: https://github.com/patorjk/eslint-plugin-react-helpers/blob/main/lib/rules/prefer-use-state-lazy-initialization.js
from react.
Related Issues (20)
- Bug: On mobile devices, clicking a checkbox in a list of checkboxes will sometimes toggle the wrong one.
- Bug: node cached in the InternalNode,it's cause a huage memory leak HOT 2
- Improvement: Add a log when react-dom is running on RSC instead of SSR HOT 1
- Bug: Popover API not supported HOT 3
- Bug: How to deal with HTML popover in react HOT 4
- Bug: A SAMPLE ISSUE TO PARTICIPATE IN DISCUSSION
- Bug: A SAMPLE ISSUE
- Bug: onClick doesn't work on any element inside disabled fieldset in Firefox HOT 3
- Bug: Hydration fails with statically rendered html when wrapping component in <Suspense> HOT 1
- Bug: Error Boundary not updating and not calling componentDidCatch despite catching error HOT 3
- Source code for for React 16.14.0? HOT 13
- Bug: Events in separate roots are not batched HOT 2
- Bug: Component suspended by `use` fails to react when suspension depends on external store HOT 1
- Bug: Curly Brace Symbol Doesn't Show (change open attribute value) HOT 1
- Bug: performance deteriorates when using ReactDOM.createRoot instead of ReactDom.render for virtual-table. HOT 2
- postMessage getting spammed from developer tools when turned off in non-react site HOT 5
- Bug: ReadableStream can be written to after close
- Bug: Constraining children to type has no effect HOT 5
- [DevTools Bug] Cannot add node "1" because a node with that id is already in the Store. HOT 1
- Bug: react-hooks/exhaustive-deps reports a dependency if `typeof` TypeScript operator is used in a function. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react.