Has anyone gotten optional chaining working?

Hey there,

I’m fairly new to RedwoodJS, so I could be messing up something simple. I was wondering if anyone has gotten optional chaining setup and working on their project (the ?. operator).

I was following this guide (@babel/plugin-proposal-optional-chaining · Babel) and added the requirements to my project but it doesn’t seem to be working.

Any help would be greatly appreciated - thank you!

Hey! The ?. operator should already be working out of the box! Have you tried to use it, and if it didn’t work was it on the api side or the web side?

Ah ok, maybe I messed something up then - I was trying to do it on the web side. Thanks!

3 Likes

Works for me on both sides and as @peterp says it’s out of the box :slight_smile:

1 Like

I think we should probably document the syntax that we support out of the box. It took me a long time to understand the babel-preset-env stuff; it would be good for me to make it clearer to people using the framework.

4 Likes