React version

Is the version of react locked in? I can see it's 17+ whereas the latest as we all know is 18+. I tried to set it to 18 with dependency rule in .wasp file like so
dependencies: [
("react", "18.2.0")
]
dependencies: [
("react", "18.2.0")
]
and got an error:
❌ --- [Error] Your wasp project failed to compile: -------------------------------

- Error: Dependency conflict for user dependency (react, 18.2.0): Version must be set to the exactly the same version as the one wasp is using: ^17.0.2


❌ --- [Error] Recompilation on file change failed.: ------------------------------

1 errors found
❌ --- [Error] Your wasp project failed to compile: -------------------------------

- Error: Dependency conflict for user dependency (react, 18.2.0): Version must be set to the exactly the same version as the one wasp is using: ^17.0.2


❌ --- [Error] Recompilation on file change failed.: ------------------------------

1 errors found
No description
10 Replies
matijash
matijash2y ago
yes, some of the core packages (like React) are locked to what is Wasp using internally. I think we could actually upgrade, any reason @martinsos why we haven't yet?
IamIconLiving
IamIconLiving2y ago
is it possible to let developer control this? and ofc for those who don't care, wasp does things by default like it does now
matijash
matijash2y ago
yep, we actually could do that potentially! We could even support having multiple versions of the same lib, so you don't depend on what wasp uses
IamIconLiving
IamIconLiving2y ago
:boi:
MEE6
MEE62y ago
Wohooo @IamIconLiving 🎄, you just became a Waspeteer level 1!
matijash
matijash2y ago
@IamIconLiving 🎄 is there any particular feature from React 18 you'd like to use?
IamIconLiving
IamIconLiving2y ago
for a todo app that I am putting together to discover wasp nope, but doing a production grade app I'd like to use latest stable versions of react
matijash
matijash2y ago
for sure! let us know how it went, would love to get your feedback 🙂
miho
miho2y ago
Wasp provides you with bits and pieces of React code and we need to know which React version we are targeting. And since the way the app is mounted changed from 17 to 18, we can't support both out of the box without making some changes internally. :/ That being said, we have a plan to upgrade to React 18 soon (next Wasp release probably) since it's not a big migration for us, but we do need to test everything well, to make sure that the whole DX is still good 🙂
IamIconLiving
IamIconLiving2y ago
absolutely @miho ! thanks for your responsiveness guys!
Want results from more Discord servers?
Add your server