profile
viewpoint
Alexey Raspopov alexeyraspopov Boston, MA / Kyiv, Ukraine https://alexeyraspopov.com Curious developer.

alexeyraspopov/dataclass 63

Immutable value objects for JavaScript & TypeScript

alexeyraspopov/babel-plugin-style-literal 8

Compile tagged string literal with CSS to a plain object with JSX inline styles

alexeyraspopov/actor-system 7

Build robust and resilient message-driven systems

alexeyraspopov/boilerplate 5

Not "production-ready". Just for happy hacking.

alexeyraspopov/access-object 2

Data Access Object for your resources.

alexeyraspopov/async-structure 1

Set of advanced pattern implementations for dealing with async data and flows

alexeyraspopov/actor 0

[DEPRECATED]

issue commentfacebook/create-react-app

Typescript 4.1: Cannot assign to read only property 'jsx' of object

Hey guys! I Found a thread on reddit, and I discovered the problem in my case is version of typescript used in my Code Editor (VSCode).

Check here: https://www.reddit.com/r/react/comments/k0bw7y/compileroptionsjsx_must_be_reactjsx_to_support/gdh4pyb?utm_source=share&utm_medium=web2x&context=3

Quadriphobs1

comment created time in 41 minutes

issue commentfacebook/create-react-app

npx create-react-app my-app is isn't installing the packages and i try uninstalling npm using -g but still.

Thank you so much @kristianpedersen it did work. But also me too i have to run it like your own way, using the version no. but am really glad o got it working dude. Once again thanks

Ahmadzayd

comment created time in 2 hours

issue commentfacebook/create-react-app

.eslintcache constantly generated

Same... This just started happening to me today.

dominikabieder

comment created time in 2 hours

issue commentfacebook/create-react-app

Issues with running npx create-react-app on node 15.2.1

I ran npm install -g npm@latest

out of all 1 million articles i have read your comment was my dream come true lol !! THANK YOU 🙏 !

JunayedMizan

comment created time in 3 hours

issue commentfacebook/create-react-app

Error migrating to Yarn 2

Does work with: yarn set version from sources yarn add react-refresh eslint-config-react-app

milichev

comment created time in 4 hours

issue commentfacebook/react

[ESLint]react-hooks/exhaustive-deps rule autofix modifies code function, violating eslint best practices

@skitterm did you find out what tool is autofixing your code? I have similar issue, eslint is autofixing the dependency in the useEffect.

Alphy11

comment created time in 6 hours

issue commentfacebook/create-react-app

Hot Reload stopped working with React "^17.0.1"

console.dir(process.env); placed at the root of the app will confirm right away whether FAST_REFRESH and other settings are set.

StewartGF

comment created time in 6 hours

issue commentfacebook/create-react-app

Slow compilation still after upgrade to new version 4.0.1

@eek I have done the same thing and but it's not working

dagar07

comment created time in 8 hours

PR closed facebook/reason

Reviewers
update ocaml version constraint to allow 4.08, bump package version to 3.4.2, add test script for esy, update README.md and HISTORY.md CLA Signed cla signed

Bumped ocaml version constraints now that https://github.com/facebook/reason/pull/2345 is released. It looks like there were already notes written up for 3.4.2 so I bumped to that version as this seems fine for a patch version.

+17 -12

1 comment

6 changed files

bandersongit

pr closed time in 8 hours

pull request commentfacebook/reason

update ocaml version constraint to allow 4.08, bump package version to 3.4.2, add test script for esy, update README.md and HISTORY.md

There have been similar changes pushed to master. Closing this one.

bandersongit

comment created time in 8 hours

issue commentfacebook/react

Bug: React's batching makes state comparison checks unreliable

ReactDOM.flushSync! TIL 😮

If this is just a workaround, are we saying that it is something that needs/will be fixed?

I'm not sure how we'll explain to our consumers 😅 Do we know when this predictably occurs and when this kind of fix is needed so we can maybe document it?

Thanks for the help @eps1lon

benoitgrelard

comment created time in 8 hours

issue commentfacebook/react

Defer Execution of Unmount Life Cycle Hooks

Exit animations are a separate problem that we intend to work on in the future. useEffect alone is not a solution to them, although it's an important piece.

I sent my message after you but I did not see your answer before submitting. I am happy that the React core team is aware of the feature request and that they will work on it.

sebmarkbage

comment created time in 8 hours

issue commentfacebook/react

Bug: Run exceptions in Chrome Extension

your reducer shouldn't mutate the current state but return it

@MrQinYQ Could you migrate all the push, splice and assignments to a variant that returns a new object instead? Maybe that resolves the issue but it'll definitely help maintainers to identify the issue.

MrQinYQ

comment created time in 8 hours

issue commentfacebook/react

Defer Execution of Unmount Life Cycle Hooks

Thank you @frankandrobot I have the exact same question.

Say I have a Modal component that is displayed according to a boolean.


<>
{
    isVisible && <Modal/>
}
</>

Now, when isVisible becomes falsy, I would like to perform some exit animation on the Modal before the Modal is unmounted. You may say that I could actually pass isVisible as a prop to is Modal so that it can itself control its enter and exit animation.


<>
{
    <Modal isVisible={isVisible} />
}
</>

This is the simple case. The problem is that sometimes this Modal unMount is caused by an entire tree unmounted above it, on which we do not necessarily have control.

A workaround that I have used is to actually copy the modal dom on unmount and send it to an exit animation context that would perform the animation on a copied DOM node. I think the library framer-motion uses a similar idea to perform animations on dom nodes rendered by different components. The problem is that it is not really reacty, maybe I actually want to perform an exit animation that would involve the children of the Modal. For example, I would like to animate its children first, then animate the modal exit. I am not sure there is a real way to solve this animation problem without complex over-engineering, it is possibly a limitation of the React render model. Right now I just totally gave up on exit animations because I don't want my apps to be too complex.

But yes essentially we would love to be able to defer the unmount of a component, maybe with an imperative api.

useUnMountEffect( () => {
        return function (unMount : Function) =>  {
                 // We can still change the component state here and perform actions.
                 setState({....});
                 dispatch({...});
                unMount(); //  <---- We tell react, now this is the time to unmount ! 
        }
     }        
)

Is there any way we could emulate this behavior ? Somebody mentionned to me that CM would be able to handle such cases but I am not sure how yet.

sebmarkbage

comment created time in 8 hours

issue commentfacebook/react

Bug: React's batching makes state comparison checks unreliable

The workaround for this particular issue is similar to https://github.com/facebook/react/issues/18591:

React.useLayoutEffect(() => {
  ref.current = value;
});
....
<div onBlur={() => {
  ReactDOM.flushSync(() => {
    setValue(false)
  })
}}>

-- https://codesandbox.io/s/flushsync-semantics-eli4w?file=/src/App.js:1520-1580

Though it makes me wonder whether https://github.com/facebook/react/issues/18591 is not just related to concurrent mode. Intuitively I would not expect https://codesandbox.io/s/crimson-lake-gidmx?file=/src/App.js to work the way it does right now.

benoitgrelard

comment created time in 8 hours

issue commentfacebook/react

Defer Execution of Unmount Life Cycle Hooks

Exit animations are a separate problem that we intend to work on in the future. useEffect alone is not a solution to them, although it's an important piece.

sebmarkbage

comment created time in 8 hours

issue commentfacebook/create-react-app

4.0.0 breaks with typescript (all versions)

Fix for me was to adjust the TS version within VS code. image

THIS.

benneq

comment created time in 9 hours

issue commentfacebook/react

Bug: React's batching makes state comparison checks unreliable

@sebmarkbage We have looked into this some more. It definitely seems that there is a use-case that is not possible to get working here.

We have created another sandbox that describes the steps to reproduce and answers your “why does it matter?” question. We would be super grateful if you wouldn’t mind taking a look and giving us a hand here :slightly_smiling_face:

https://codesandbox.io/s/crimson-lake-gidmx?file=/src/App.js

benoitgrelard

comment created time in 9 hours

startedwKich/creevey

started time in 9 hours

issue commentfacebook/react

Bug: React's batching makes state comparison checks unreliable

@sebmarkbage We have looked into this some more. It definitely seems that there is a use-case that is not possible to get working here.

We have created another sandbox that describes the steps to reproduce and answers your "why does it matter?" question. We would be super grateful if you wouldn't mind taking a look and giving us a hand here 🙂

https://codesandbox.io/s/crimson-lake-gidmx?file=/src/App.js

benoitgrelard

comment created time in 9 hours

issue commentfacebook/create-react-app

Too many cpu and ram usage on production build

@jamiehaywood this workaround https://github.com/facebook/create-react-app/issues/10119#issuecomment-734184155 fixes the CI failing for me

Aspedm

comment created time in 9 hours

issue commentfacebook/react

Bug: Run exceptions in Chrome Extension

your reducer shouldn't mutate the current state but return it

MrQinYQ

comment created time in 10 hours

issue commentfacebook/create-react-app

Auto reload does not detect changes to index.js

Same here, please fix this issue.

uzair-suria

comment created time in 10 hours

startedfacebookincubator/propfuzz

started time in 10 hours

issue commentfacebook/react

Bug: onLoadStart is not passed to img

My understanding of the issues:

  • the onloadstart event is valid event for images in the specs: https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onloadstart
  • It's true is not supported by Chrome, but this is registered as a bug. The facts that chrome had this issue will make the feature unusable on most of the users, but still…

I'm not sure why React should handle this differently form that the browser is doing.

keul

comment created time in 10 hours

issue openedfacebook/create-react-app

Issue with npm. Can't create an app

PS C:\Users\DELL\Desktop\fullstack\codedamn> node -v v15.3.0 PS C:\Users\DELL\Desktop\fullstack\codedamn> npm -v 7.0.14 PS C:\Users\DELL\Desktop\fullstack\codedamn> npx create-react-app my-app
Need to install the following packages: create-react-app Ok to proceed? (y) y

Creating a new React app in C:\Users\DELL\Desktop\fullstack\codedamn\my-app.

Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts with cra-template...

npm ERR! code 4294967295 npm ERR! path C:\Users\DELL\Desktop\fullstack\codedamn\my-app\node_modules\core-js-pure npm ERR! command failed npm ERR! command bash -c node -e "try{require('./postinstall')}catch(e){}" npm ERR! Windows Subsystem for Linux has no installed distributions. npm ERR! Distributions can be installed by visiting the Microsoft Store: npm ERR! https://aka.ms/wslstore npm ERR!

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\DELL\AppData\Local\npm-cache_logs\2020-11-27T13_25_10_199Z-debug.log

Aborting installation. npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.

Deleting generated file... node_modules Deleting generated file... package.json

created time in 11 hours

issue commentfacebook/react

useLayoutEffect in ssr

Giving this another bump, as useIsomorphicLayoutEffect gets confused by Jest+JSDOM as @markerikson pointed out. We either have the test logs polluted by this error warning or have a separate maintenance overhead with separated test classes for SSR, annotated with the alternative jest node environment.

dimensi

comment created time in 11 hours

issue commentfacebook/create-react-app

create-react-app should allow TypeScript imports outside `src`

@ttaranov react-app-rewired stopped supporting CRA at version 2.0 and now we are at 4.0, so isn't this a very fragile setup?

bluenote10

comment created time in 11 hours

issue closedfacebook/react

improved

closed time in 11 hours

A-Asatiani

issue closedfacebook/react

imp

closed time in 11 hours

A-Asatiani
more