2021-10-06 Version 1.8.10 (422)

Hi,
i have problems with this new version:
2.66dbbd2c.chunk.js:sourcemap:1 TypeError: Cannot read properties of undefined (reading ‘dataSlots’)
undefined using this.props…
i cannot able to use this version with an old project!!

Hi,

Is it possible that you have some custom scripts somewhere which access data slots? The latest release changed the way Dataslots are carried now with context (https://reactjs.org/docs/context.html)

Example: (this.context.appActions.dataSlots[‘ds_activeLang’])

Studio cleans/fixes all scripts with the new ones but it is definitely possible that there are some cases where this does not work. If you can trace the script and where it locates send us an email to hello@neonto.com

P.S. Unfortunately we cannot support both ways so the old projects need to be changed to use context. It should happen automatically in most cases,

hi, i have sent you an email.

1 Like

I have about the same error.

Strangely I have another component called ListProCategoryAutoSuggestion.js which does not throw this error and it is mainly the same code.

… and another two more errors of that kind …


The last update fixed this problem.
Thanks for fixing this so quickly :+1:

I guess, now I’ll need to fix my custom code for DataSlot access from
this.props.appActions… to this.context.appActions…?

1 Like

First huge thanks to Paolo for sending use the project file!

The issue was in projects which user’s had added scripts to screen/component templates. It is now fixed and Studio should fix the scripts to use context.

Having ability add custom scripts is great but it also makes projects vulnerable if we change something in the code generation. React evolves so time to time we need to update the code generation. This is why we usually suggest to create plugins instead of scripts which are less vulnerable to issues (still there is no 100% sure that even plugins work in case of significant changes in the code generation).

2 Likes

Annti, it is good that ract evolves and with it React Studio.
Can you consider so the possibility to select if upgrade or no react studio and let us (and not on every starts) to create more react studio installetions for old projects?

You can always click Cancel when the Update window is shown on startup. It’s a bit annoying but that way you can keep using the old version.

For us it is not a very good if there are lot’s of old versions and that’s why the app keeps sking that on every startup.

1 Like

Antti,
if i have a window with two or more states linked to a dataslot and i chang the dataslot value the window state does not change!!
can you try?

Hi,
i think that there are problems with components cards shadows when in list! The shadow there is not!