profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/flarnie/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Flarnie Marchan flarnie Chegg Oakland, CA http://www.flarnie.com Software Engineer at Chegg Former React Core Team & Co-maintainer of Draft.js

bvaughn/react 15

A declarative, efficient, and flexible JavaScript library for building user interfaces.

flarnie/dotvim 3

Configurations for Vim

cjavdev/Pairer 2

Tool to force students to work with as many unique pairs as possible among their sub group

flarnie/CIsForCoding 2

A playground for learning C

flarnie/diffux 1

A tool to diff website snapshots

flarnie/dotfiles2 1

General dotfile configurations (excluding Vim configs)

flarnie/draft-js 1

A React framework for building text editors.

flarnie/accio 0

Configurable generator creation tool for node.js. Write JS faster; `accio GENERATOR NAME ARGS`

flarnie/bistro 0

Bistro is a flexible distributed scheduler, a high-performance framework supporting multiple paradigms while retaining ease of configuration, management, and monitoring.

MemberEvent

issue openedfacebook/relay

Error when using prependEdge directive for an aliased connection

I currently get an error when using the prependEdge directive for a connection that has been aliased. Works fine for any connections not aliased.

The error message: The connection with id 'client:VXNlcjox:__ProfileCurrentGoals_currentGoals_connection' doesn't exist.

The connection with goals renamed to alias currentGoals

  fragment ProfileCurrentGoals_user on User
  @argumentDefinitions(
    count: { type: "Int", defaultValue: 10 }
    cursor: { type: "String" }
  )
  @refetchable(queryName: "ProfileCurrentGoalsQuery") {
    id
    currentGoals: goals(first: $count, after: $cursor, isCompleted: false)
      @connection(key: "ProfileCurrentGoals_currentGoals") {
      edges {
        cursor
        node {
          id
          ...GoalNode_goal
        }
      }
    }
  }

The mutation:

  mutation CreateGoalMutation($connections: [ID!]!, $input: CreateGoalInput!) {
    createGoal(input: $input) {
      successful
      result {
        goalEdge @prependEdge(connections: $connections) {
          cursor
          node {
            ...GoalNode_goal
          }
        }
      }
    }
  }

created time in an hour

issue commentfacebook/relay

Internal Error: Unexpected extension kind: 'InputObjectTypeDefinition'

In my case it was caused by a duplicate of schema.graphql stored in another folder.

Yep. Same here. For me, I had an older file named schema3.sql in the same folder. The unhelpful error message would have driven me insane. I was saved by a Google search that brought me here.

momakes2

comment created time in an hour

startedChristianChiarulli/LunarVim

started time in 2 hours

pull request commentreactjs/zh-hans.reactjs.org

Update hooks-effect.md

:x: Deploy Preview for zh-hans-reactjs failed.

:hammer: Explore the source changes: caaae6806292092c852a681a68da1e8272ca3ad3

:mag: Inspect the deploy log: https://app.netlify.com/sites/zh-hans-reactjs/deploys/60ceb6b2baee27000776a3f5

rosald

comment created time in 4 hours

PR opened reactjs/zh-hans.reactjs.org

Update hooks-effect.md

我的理解是这样的。不知道对不对。原文是 also ,表达意思是 同样也会 。就是说,除了会在"组件卸载"时之行清除操作,“同样’也‘会”在更新的时候执行

<!--

Thank you for the PR! Contributors like you keep React awesome!

Please see the Contribution Guide for guidelines:

https://github.com/reactjs/reactjs.org/blob/master/CONTRIBUTING.md

If your PR references an existing issue, please add the issue number below

-->

+1 -1

0 comment

1 changed file

pr created time in 4 hours

push eventreactjs/es.reactjs.org

Gift Egwuenu

commit sha 6e6500e7668255c34e44f27b6cb74f367dbf8074

Add React Conference Live 2021 (#3718) * Add React Conference Live 2021 * Update conferences.md Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>

view details

Andrew Clark

commit sha 7b0aecbe6d6537bfcc37d5ae6dc036a945f97728

New post: The Plan for React 18 (#3729) * New post: The Plan for React 18 * Mark CM docs as stale * Update content/blog/2021-06-08-the-plan-for-react-18.md Co-authored-by: Ricky <rickhanlonii@gmail.com> * Simplify Co-authored-by: Dan Abramov <dan.abramov@me.com> Co-authored-by: Dan Abramov <dan.abramov@gmail.com> Co-authored-by: Ricky <rickhanlonii@gmail.com>

view details

Dan Abramov

commit sha 95ea219b83ac6cd9ea1641ff87c693c7a3d92cc8

Fix hanging word

view details

Andrew Clark

commit sha 589c0338c59bf08bceb26bd00d28ec7225d1215f

Add /link/switch-to-createroot (#3730) Redirects to the working group document that explains how to upgrade from ReactDOM.render to ReactDOM.createRoot. https://github.com/reactwg/react-18/discussions/5

view details

dependabot[bot]

commit sha bb3702da72cb2f2732143a04ab490ea26600c9d3

Bump dns-packet from 1.3.1 to 1.3.4 (#3700)

view details

dependabot[bot]

commit sha f3baa6d075c8de475b688abf035d7054bc8a9606

Bump ws from 5.2.2 to 5.2.3 (#3735)

view details

reactjs-translation-bot

commit sha 725f738a0a34490be0124cb00ab17b34a97b16df

merging all conflicts

view details

Rainer Martínez Fraga

commit sha 26ad0246b8a5a36380a22ad9b2f70a5e7b6d3072

Resolve merge conflicts

view details

Rainer Martínez Fraga

commit sha 8e6fb025f81fe85c10493fab49d51370cbf985d7

Merge pull request #463 from reactjs/sync-f3baa6d0 Sync with reactjs.org @ f3baa6d0

view details

push time in 4 hours

PR merged reactjs/es.reactjs.org

Reviewers
Sync with reactjs.org @ f3baa6d0

This PR was automatically generated.

Merge changes from reactjs.org at f3baa6d0

The following files have conflicts and may need new translations:

Please fix the conflicts by pushing new commits to this pull request, either by editing the files directly on GitHub or by checking out this branch.

DO NOT SQUASH MERGE THIS PULL REQUEST!

Doing so will "erase" the commits from master and cause them to show up as conflicts the next time we merge.

+53 -45

1 comment

12 changed files

reactjs-translation-bot

pr closed time in 4 hours

push eventreactjs/es.reactjs.org

Rainer Martínez Fraga

commit sha 26ad0246b8a5a36380a22ad9b2f70a5e7b6d3072

Resolve merge conflicts

view details

push time in 5 hours

pull request commentfacebook/relay

Better wording

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

felipe-gdr

comment created time in 6 hours

pull request commentfacebook/relay

Better wording

Hi @felipe-gdr!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

felipe-gdr

comment created time in 6 hours

PR opened facebook/relay

Better wording
+2 -2

0 comment

1 changed file

pr created time in 6 hours

PR opened immutable-js/immutable-js

Convert website to Next.js
+13915 -23252

0 comment

62 changed files

pr created time in 8 hours

push eventimmutable-js/immutable-js

Lee Byron

commit sha 1b522afb1037e0532e0f36bfbcbdf35ba478ebd1

Convert website to Next.js

view details

push time in 8 hours

create barnchimmutable-js/immutable-js

branch : next-website

created branch time in 8 hours

startedSorcery/sorcery

started time in 9 hours

issue commentimmutable-js/immutable-js

Immutable.js is essentially unmaintained

Matrix could also be an interesting option for project chat; it's an accessible option that's also open-source and not dependent on the generosity and ongoing support of any one given chat company, it being an open network.

(It can also be bridged to Discord if desired, though I'm unsure of the implementation details of setting that up.)

conartist6

comment created time in 10 hours

issue closedfacebook/react

React 18 : Project dependency tree issue.

<!-- Ask a question or share feedback about the React 18 release here. -->

yarn run v1.22.5
$ react-scripts start

There might be a problem with the project dependency tree.
It is likely not a bug in Create React App, but something you need to fix locally.

The react-scripts package provided by Create React App requires a dependency:

  "babel-jest": "^26.6.0"

Don't try to install it manually: your package manager does it automatically.
However, a different version of babel-jest was detected higher up in 
the tree:

  C:\Users\UNION\node_modules\babel-jest (version: 27.0.2)

Manually installing incompatible versions is known to cause hard-to-debug issues.

If you would prefer to ignore this check, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That will permanently disable this message but you might encounter other issues.

To fix the dependency tree, try following the steps below in the exact order:

  1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
  2. Delete node_modules in your project folder.
  3. Remove "babel-jest" from dependencies and/or devDependencies in 
the package.json file in your project folder.
  4. Run npm install or yarn, depending on the package manager you use.

In most cases, this should be enough to fix the problem.
If this has not helped, there are a few other things you can try:    

  5. If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
     This may help because npm has known issues with package hoisting which may get resolved in future versions.

  6. Check if C:\Users\UNION\node_modules\babel-jest is outside your 
project directory.
     For example, you might have accidentally installed something in 
your home folder.

  7. Try running npm ls babel-jest in your project folder.
     This will tell you which other package (apart from the expected 
react-scripts) installed babel-jest.

If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file 
in your project.
That would permanently disable this preflight check in case you want 
to proceed anyway.

P.S. We know this message is long but please read the steps above :-) We hope you find them helpful!

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 



- I'm not able to solve this issue, I did tried the following steps but it seems like I'm not getting this? Please give some suggestions, so that i could work on my project smoothly.

closed time in 12 hours

vaish567

issue commentfacebook/react

React 18 : Project dependency tree issue.

Support requests filed as GitHub issues often go unanswered. We want you to find the answer you're looking for, so we suggest the following alternatives:

Coding Questions If you have a coding question related to React and React DOM, it might be better suited for Stack Overflow. It's a great place to browse through frequent questions about using React, as well as ask for help with specific questions.

https://stackoverflow.com/questions/tagged/react

Talk to other React developers There are many online forums which are a great place for discussion about best practices and application architecture as well as the future of React.

https://reactjs.org/community/support.html

vaish567

comment created time in 12 hours

issue openedfacebook/react

React 18 : Project dependency tree issue.

<!-- Ask a question or share feedback about the React 18 release here. -->

yarn run v1.22.5
$ react-scripts start

There might be a problem with the project dependency tree.
It is likely not a bug in Create React App, but something you need to fix locally.

The react-scripts package provided by Create React App requires a dependency:

  "babel-jest": "^26.6.0"

Don't try to install it manually: your package manager does it automatically.
However, a different version of babel-jest was detected higher up in 
the tree:

  C:\Users\UNION\node_modules\babel-jest (version: 27.0.2)

Manually installing incompatible versions is known to cause hard-to-debug issues.

If you would prefer to ignore this check, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That will permanently disable this message but you might encounter other issues.

To fix the dependency tree, try following the steps below in the exact order:

  1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
  2. Delete node_modules in your project folder.
  3. Remove "babel-jest" from dependencies and/or devDependencies in 
the package.json file in your project folder.
  4. Run npm install or yarn, depending on the package manager you use.

In most cases, this should be enough to fix the problem.
If this has not helped, there are a few other things you can try:    

  5. If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
     This may help because npm has known issues with package hoisting which may get resolved in future versions.

  6. Check if C:\Users\UNION\node_modules\babel-jest is outside your 
project directory.
     For example, you might have accidentally installed something in 
your home folder.

  7. Try running npm ls babel-jest in your project folder.
     This will tell you which other package (apart from the expected 
react-scripts) installed babel-jest.

If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file 
in your project.
That would permanently disable this preflight check in case you want 
to proceed anyway.

P.S. We know this message is long but please read the steps above :-) We hope you find them helpful!

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 



- I'm not able to solve this issue, I did tried the following steps but it seems like I'm not getting this? Please give some suggestions, so that i could work on my project smoothly.

created time in 12 hours

issue commentreactjs/reactjs.org

Memory leak with setState lambda setting to previous state

Raised in the wrong project... will raise in react project.

Haemoglobin

comment created time in 12 hours

issue closedreactjs/reactjs.org

Memory leak with setState lambda setting to previous state

Hi,

It seems that there is a memory leak issue when using the set state hook lambda syntax, and setting the state to the previous state. The set state lambda in this scenario seems to be retained and never garbage collected.

Please ignore the contrived example, it's intentionally whittled down to the exact issue. It's quite a common requirement in our application to subscribe to an rxjs observable in a useEffect hook, then update some state when events are received (but the data received might not always result in a state change). The lambda syntax is required in the set state call because current state would otherwise always be the default state due to the closure around it in the useEffect hook. Even if there was another way to do it to avoid the issue, it's still a surprising behaviour and makes it harder to fall into the 'pit of success'.

Reproduction below:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>Memory leak repro</title>
    <script src="https://unpkg.com/react@17/umd/react.development.js"></script>
    <script src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"></script>

    <script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
  </head>
  <body>
    <div id="root"></div>
    <script type="text/babel">
        function App() {
          const [someState, setSomeState] = React.useState(false);
          React.useEffect(() => {
             const interval = setInterval(() => {
               const a = []; 
               for (var i = 0; i < 1000; i++) {
                 a.push({}); //produce lots of garbage objects to make the leak easier to see
               }
               // memory leak when setting state to previous state
               // set state lambda is not garbage collected and retained along with all of its captured closures
               setSomeState(state => a.length > 0 ? state : !state);

               // no memory leak when setting state to something other than previous state
               // set state lambda (and it's closures) are garbage collected as expected
               // setSomeState(state => a.length == 0 ? state : !state);
              }, 100);
             return () => clearInterval(interval);
          }, []);
          return <div>Test Memory Leak</div>;
      }


      ReactDOM.render(
        <App/>,
        document.getElementById('root')
      );

    </script>
  </body>
</html>

The best memory profiler to see this is the 'Allocation instrumentation on timeline' mode in chrome devtools.

I have confirmed this also happens using production / minified bundles so it's not a dev build issue.

Right now as a workaround I need to use 'hacks' like useRef and forceUpdate implementations which is a real shame so keen to see this fixed.

Many thanks!

closed time in 12 hours

Haemoglobin

issue openedfacebook/react

Bug: Memory leak with setState lambda setting to previous state

Hi,

It seems that there is a memory leak issue when using the set state hook lambda syntax, and setting the state to the previous state. The set state lambda in this scenario seems to be retained and never garbage collected.

Please ignore the contrived example, it's intentionally whittled down to the exact issue. It's quite a common requirement in our application to subscribe to an rxjs observable in a useEffect hook, then update some state when events are received (but the data received might not always result in a state change). The lambda syntax is required in the set state call because current state would otherwise always be the default state due to the closure around it in the useEffect hook. Even if there was another way to do it to avoid the issue, it's still a surprising behaviour and makes it harder to fall into the 'pit of success'.

Reproduction below:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>Memory leak repro</title>
    <script src="https://unpkg.com/react@17/umd/react.development.js"></script>
    <script src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"></script>

    <script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
  </head>
  <body>
    <div id="root"></div>
    <script type="text/babel">
        function App() {
          const [someState, setSomeState] = React.useState(false);
          React.useEffect(() => {
             const interval = setInterval(() => {
               const a = []; 
               for (var i = 0; i < 1000; i++) {
                 a.push({}); //produce lots of garbage objects to make the leak easier to see
               }
               // memory leak when setting state to previous state
               // set state lambda is not garbage collected and retained along with all of its captured closures
               setSomeState(state => a.length > 0 ? state : !state);

               // no memory leak when setting state to something other than previous state
               // set state lambda (and it's closures) are garbage collected as expected
               // setSomeState(state => a.length == 0 ? state : !state);
              }, 100);
             return () => clearInterval(interval);
          }, []);
          return <div>Test Memory Leak</div>;
      }


      ReactDOM.render(
        <App/>,
        document.getElementById('root')
      );

    </script>
  </body>
</html>

The best memory profiler to see this is the 'Allocation instrumentation on timeline' mode in chrome devtools.

I have confirmed this also happens using production / minified bundles so it's not a dev build issue.

Right now as a workaround I need to use 'hacks' like useRef and forceUpdate implementations which is a real shame so keen to see this fixed.

Many thanks!

created time in 12 hours

issue closedimmutable-js/immutable-js

[TS 4.1.x] Invalid .d.ts typings

What happened

yarn tsc                 9.2s  Ср 30 дек 2020 13:02:33
yarn run v1.22.5
$ /home/i/all_work/pandadoc/kolas-editor-monorepo/node_modules/.bin/tsc
../../@types/immutable/index.d.ts:2686:22 - error TS2430: Interface 'Keyed<K, V>' incorrectly extends interface 'Seq<K, V>'.
  The types returned by 'map(...).map(...).flatMap(...).toJS()' are incompatible between these types.
    Type 'Object' is not assignable to type 'unknown[] | { [key: string]: unknown; }'.
      The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?
        Type 'Object' is not assignable to type '{ [key: string]: unknown; }'.
          The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?
            Index signature is missing in type 'Object'.

2686     export interface Keyed<K, V> extends Seq<K, V>, Collection.Keyed<K, V> {
                          ~~~~~

../../@types/immutable/index.d.ts:3234:22 - error TS2430: Interface 'Keyed<K, V>' incorrectly extends interface 'Collection<K, V>'.
  The types returned by 'toJS()' are incompatible between these types.
    Type 'Object' is not assignable to type 'unknown[] | { [key: string]: unknown; }'.
      The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?
        Type 'Object' is not assignable to type '{ [key: string]: unknown; }'.
          The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?
            Index signature is missing in type 'Object'.

3234     export interface Keyed<K, V> extends Collection<K, V> {
                          ~~~~~


Found 2 errors.

error Command failed with exit code 2.

How to reproduce

Install yarn add immutable@latest

// tsconfig.json
{
  "compilerOptions": {
    "skipLibCheck": false,
  }
}
// Run type checker
yarn tsc --noEmit

closed time in 13 hours

retyui

issue commentimmutable-js/immutable-js

[TS 4.1.x] Invalid .d.ts typings

Resolved in https://github.com/immutable-js/immutable-js/pull/1827.

retyui

comment created time in 13 hours

issue closedimmutable-js/immutable-js

TypeScript 4.1.2 resolves notSetValue to unknown

<!--

                            STOP AND READ THIS BEFORE POSTING YOUR ISSUE


                                              ---  Have a general question?  ---

First check out the Docs: https://facebook.github.io/immutable-js/docs/ And check out the Wiki: https://github.com/facebook/immutable-js/wiki/ Search existing issues: https://github.com/facebook/immutable-js/search?type=Issues&q=question Ask on Stack Overflow!: https://stackoverflow.com/questions/tagged/immutable.js?sort=votes

  • Stack Overflow gets more attention

  • Answered questions are searchable

  • A whole community can answer

                                                       ---  Feature request?  ---
    

This library attempts to be as stable as possible so features have to meet a high bar to be added. This library also prefers interoperability with other libraries over continuous additions. Here are some tips to get your feature added:

  • Search existing issues and pull requests first.

  • Send a Pull Request! Start with API design and post for review early.

                                                          ---  Found a bug?  ---
    

Search existing issues first: https://github.com/facebook/immutable-js/search?type=Issues&q=bug Please ensure you're using the latest version, and provide some information below.

-->

What happened

The TypeScript signature of methods like first, last, etc that take a notSetValue is:

first<NSV>(notSetValue?: NSV): V | NSV;

In TypeScript (at least in 4.1.2) if no argument is passed, NSV becomes unknown, not undefined as documented.

Possible fix:

first<NSV = undefined>(notSetValue?: NSV): V | NSV;

I found this PR but it never got merged: #1653. I think = undefined is less verbose as it doesn't create a new overload. If going with this overload approach, the correct declaration would be (instead of the one in the PR):

first(): V | undefined;
first<NSV>(notSetValue?: NSV): V | NSV;

I'd create a PR but didn't know how you wanted to handle #1653.

Note that other methods that accept a notSetValue argument probably suffer from the same issue.

Thank you.

closed time in 13 hours

pedro-pedrosa

issue commentimmutable-js/immutable-js

TypeScript 4.1.2 resolves notSetValue to unknown

This has been resolved in https://github.com/immutable-js/immutable-js/pull/1676, but hasn't been released yet.

pedro-pedrosa

comment created time in 13 hours

issue commentimmutable-js/immutable-js

Immutable.js is essentially unmaintained

@leebyron Thanks for taking the time to get this project back up and running! Maintaining open-source is hard and unrewarding work and we appreciate the work you've put into this project to get it to where it is today.

I've started working on cleaning up the issues and PRs and created a milestone for the regressions from 3.x to 4.x (we have fixes for almost all of them on the fork, we just need to get the work moved over here). I'm excited to get these changes merged in, but don't want to step on your toes. The Slack workspace is still active if you're interested in joining there so we can coordinate our efforts (alternatively we could start a Discord server or add a channel on Reactiflux since that seems popular among the OSS/JS dev community). Or if you're fine with me starting to merge PRs I can just start doing that. I wasn't sure if you had a set plan for how to get the work from the fork merged in, or if we should just recreate the PRs on this repo so they can be re-vetted for inclusion here.

conartist6

comment created time in 13 hours

PR closed immutable-js/immutable-js

fixed Invalid value used as weak map key #1643

fixed https://github.com/immutable-js/immutable-js/issues/1643

+28 -3

2 comments

2 changed files

abrcdf1023

pr closed time in 14 hours

pull request commentimmutable-js/immutable-js

fixed Invalid value used as weak map key #1643

Closing since this is an exact duplicate of https://github.com/immutable-js/immutable-js/pull/1654.

abrcdf1023

comment created time in 14 hours