Skip to content

Optional chaining now in stage 2 #7246

Closed

Description

@AndrewPrifer

This has been discussed in the past and I know that CRA consciously tries to only support stable features.

However the lack of optional chaining and null coalescing have long been one of the major pain points of JavaScript and the proposal recently hit stage 2. Would adding it to CRA be worth some consideration?

Activity

  1. mrmckeb commented on Jun 23, 2019

    @mrmckeb
    Contributor

    I would also love to get this in. @iansu and @ianschmitz, any objections to a PR for this one? It'll be tremendously powerful.

    @andrewpeterprifer, this is a great macro that does something similar - https://www.npmjs.com/package/idx.macro

  2. self-assigned this
    on Jun 23, 2019
  3. iansu commented on Jun 23, 2019

    @iansu
    Contributor

    We generally don't support stage 2 proposals as they still might change. We support some stage 3 proposals on a case by case basis. I personally love optional chaining but because it's still only stage 2 I don't think we should include it. I would be happy to add it once it reaches stage 3.

  4. ianschmitz commented on Jun 23, 2019

    @ianschmitz
    Contributor

    Agreed with @iansu. There's been a few notable examples of proposals changing quite drastically during the early stages. We should consider once it progresses further (I can't wait for this feature either!).

  5. mrmckeb commented on Jun 24, 2019

    @mrmckeb
    Contributor

    Agreed, let's close this off for now and keep a very close eye on it.

    @andrewpeterprifer, I think it'll be a very easy sell once it gets to stage 3.

  6. locked and limited conversation to collaborators on Jun 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions