Skip to content

look into using babel plugin for optional chaining #79

@DustinKLo

Description

@DustinKLo

optional chaining isn't supported in webpack 4 (only v5+) without using babel's optional chaining plugin
https://stackoverflow.com/a/66422985

optional chaining makes code a little more concise: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining

example code:

res.job &&
res.job.job_info &&
res.job.job_info.metrics &&
res.job.job_info.metrics.products_staged;

// would turn into

res?.job?.job_info?.metrics?.products_staged

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions