gatsbyjs/gatsby 50521
Build blazing fast, modern apps and websites with React
A lightweight html5 history library for ender.js
iamdustan/component-playground-responsive-iframe 10
A responsive iframe renderer for the React component playground.
A port of @bjankord’s php script. https://github.com/bjankord/Categorizr
Blessed UI for team standups, recorded in a google spreadsheet
Article and demos concerning bonsai for node knockout 2012.
iamdustan/babel-plugin-react-isomorphic 2
Babel plugin to transform react imports to react/lib/ReactIsomorphic
BonsaiJS is a graphics library and renderer
startediamdustan/smoothscroll
started time in 14 hours
startediamdustan/smoothscroll
started time in a day
startedgcanti/fp-ts-local-storage
started time in 2 days
startedkiranshila/cybermonday
started time in 3 days
startediamdustan/smoothscroll
started time in 3 days
startedfirstcontributions/first-contributions
started time in 4 days
startedjina-ai/jina
started time in 4 days
startediamdustan/smoothscroll
started time in 5 days
startediamdustan/smoothscroll
started time in 5 days
startediamdustan/smoothscroll
started time in 6 days
startediamdustan/smoothscroll
started time in 6 days
startediamdustan/smoothscroll
started time in 6 days
startedFieryCod/holy-lambda
started time in 7 days
issue commentreactjs/rfcs
New React 16 Context - Nesting and overrides
https://github.com/nanxiaobei/react-easy-contexts
comment created time in 7 days
startediamdustan/smoothscroll
started time in 9 days
issue commentwebflow/js-webflow-api
CMS API reference is incorrect
Stretched
comment created time in 10 days
startedgoogle/zx
started time in 10 days
issue commentwebflow/js-webflow-api
CMS API reference is incorrect
Thanks for the report! we have updated the documentation to fix the typo.
comment created time in 10 days
startediamdustan/smoothscroll
started time in 10 days
startediamdustan/smoothscroll
started time in 10 days
startediamdustan/smoothscroll
started time in 10 days
startednikitavoloboev/my-ios
started time in 10 days
startednikitavoloboev/my-mac-os
started time in 10 days
startedthreatgrid/asami
started time in 10 days
pull request commentreactjs/rfcs
Anonymous components (for using hooks with less indirection)
There are cases where this will not work as intended, as React will see all these "Anonymous Callback Components" as the same component, but they will have changing hooks. And by this will break with Reacts internals, that's what the eslint rules are trying to warn about.
Example 1 Breaks encapsulation, Callback A and B will share the same state. https://codesandbox.io/s/broken-anonymous-callback-components-forked-ej0yl?file=/src/App.js
{on ? anonymous(() => { const [countA, setCountA] = useState(0); return ( <div> <h1>A {countA}</h1> <button type="button" onClick={() => setCountA(countA + 1)}> inc A++ </button> </div> ); }) : anonymous(() => { const [countB, setCountB] = useState(0); return ( <div> <h1>B {countB}</h1> <button type="button" onClick={() => setCountB(countB + 1)}> inc B++ </button> </div> ); })}Example 2 Throws, when using different hooks Throws "Warning: React has detected a change in the order of Hooks called by Anonymous." when switching component. https://codesandbox.io/s/broken-anonymous-callback-components-forked-hvkpg?file=/src/App.js
You might hack around this using keys, but I don't think that is the way to go.
Yep, I do consider this a major drawback and open question since it can be very error prone in practice.
The best short term solution I can think of is a linter rule that can detect these situations and warn/auto-fix (by injecting some random key for each branch). Though I'd love to hear ideas from the community on how we can address this through the runtime API without relying on static analysis in the longer term.
comment created time in 10 days