Hi,
After struggling with my cf7 package for a few hours now, I wanted to see if there could be a bug in Frontity that is the problem. So I made a processor in a new test project, running the latest versions of everything. I found that if you try to set a name of the processor, you get the error:
TypeError: Cannot assign to read only property 'name' of function 'props=>{// Dummy setState to update the component.
And if you remove the name, you get the message:
The processor (missing name) needs both a "test" and a "processor" properties.
Visit https://community.frontity.org for help! 🙂
But this is my processor, it already has a test and a processor:
import React from 'react';
import { styled, connect } from "frontity";
const text = () => {
<p>test</p>
}
const test = {
//name: 'test',
priority: 20,
test: ({ component, props }) => component === "div" && props.className === "test-div",
processor: () => {
return {
component: text
}
}
};
export default connect( test );
But I read in the documentation that processors also require a name, so I’m guessing that I get that message because I don’t have a name for it, but if I set a name, I get the first error message that I wrote about. An evil cycle.