question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

need some example about the transform

See original GitHub issue

hi @maxdeviant ,

thanks for your work. but i think i cannot use this transform follow your example in docs.

i create a new project, and use redux-persist, it work well. but when i use the transform,

Uncaught TypeError: Cannot read property 'settings' of undefined

could you give me a workable demo project ?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
maxdeviantcommented, Jul 27, 2016

I think I may have found the issue.

It looks like the immutable transform returns the raw value unless the persisted state is a string:

function(raw){
  if(typeof raw === 'string'){
    return transitInstance.fromJSON(raw)
  }
  return raw
},

The encrypt transform returns its state as an object:

var newState = JSON.parse(bytes.toString(CryptoJS.enc.Utf8));
return newState;

Which means that a plain JS object is being passed back instead of an Immutable object.

I based my transform heavily on the compress transform, which behaves the same way, which leads me to believe that the immutable transform may need to be updated.

@rt2zz Perhaps you can shed some light on this?

0reactions
maxdeviantcommented, Oct 17, 2020

Closing this out due to age.

Example usage can be found in the end-to-end tests.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The best 378 transform sentence examples - YourDictionary
The most voted sentence example for transform is We've never been able to trans... ... They usually require the models to transform into...
Read more >
3 Real-World Examples of Data Transformation - Precisely
If you've found yourself pondering what data transformation examples look like in practices, here are three real-world situations.
Read more >
Types of Transformations in Math with Examples - Study.com
These transformations are rotations, reflections, and translations. There are two other types of transformation, dilations and shears, that have ...
Read more >
Transform Definition & Meaning - Merriam-Webster
transform implies a major change in form, nature, or function. transformed a small company into a corporate giant. metamorphose suggests an ...
Read more >
Transformations - Types, Rules, Formulas, Graphs, Examples
There are four common types of transformations - translation, rotation, reflection, and dilation. From the definition of the transformation, we have a rotation ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found