Just as a preface, I am using create-react-app boiler plate.
I am trying to parse out a post from the wordpress API into a react component so I can extract all images and make them their own JSX objects. I need to have each post have its own on click method so I cant just use the dangerouslyaddHTML function in React.
Currently, I search through the string of json that had the rendered HTML from the WP content of each post and find all img tags. I then add then image src to an array and set this in my state.
However I am getting this error :
DOMException: Only secure origins are allowed
The site I have this currently hosted on it http://natalie.madeline-omoore.com/build/
The code for part of my component is below:
DECLARE @Passphrase NVARCHAR(Max) = 'testpassphrase'
SELECT Convert(NVARCHAR(Max), DecryptByPassphrase(@Passphrase, @Encrypted))
I am new to react so thank you!
答案 0 :(得分:0)
这听起来像是create-react-app默认使用的“服务工作者”的问题
您可以通过将以下内容添加到index.js来注销工作程序:
setState
确保在调用registerServiceWorker()之后调用unregister()。
祝你好运,编码愉快!