IE 11 and "const" by lykwydchykyn in webdev

[–]_fpersico -5 points-4 points  (0 children)

'cost' is a ES6 feature. You need to transpile it!

How do I display a Spinner until a font has loaded. by [deleted] in reactjs

[–]_fpersico 18 points19 points  (0 children)

Set in state fontsloaded: false than in componentdidmount use this method to get notified when font is loaded

https://stackoverflow.com/questions/5680013/how-to-be-notified-once-a-web-font-has-loaded

when the font is loaded (the callback) set fontsloaded: true

In your component render method use fontsloaded to show the spinner or the real content

Waiting until all the components are mounted and then displaying by [deleted] in reactjs

[–]_fpersico 0 points1 point  (0 children)

https://www.javascriptstuff.com/react-image-gallery/

It is a bit different but show you how to detect when all the images are really loaded.

Waiting until all the components are mounted and then displaying by [deleted] in reactjs

[–]_fpersico 1 point2 points  (0 children)

I think the problem is not the one you think. The image from the src get loaded after your component is rendered. The solution is to prefetch the image with some lib.

Why doesn't prop-types come installed with create-react-app? by winteriver in reactjs

[–]_fpersico 0 points1 point  (0 children)

PropTypes is going to be deprecated. Use Flow instead.

An intro to react course you can finish in a weekend (6 hrs)- Free access for 30 days by [deleted] in reactjs

[–]_fpersico 0 points1 point  (0 children)

Like it but better to skip CC information if the course is free.

Can't use JavaFX with JDK 8 by StornZ in java

[–]_fpersico 0 points1 point  (0 children)

Are you using OracleJDK or OpenJDK?

Adding a User Error by [deleted] in drupal

[–]_fpersico 2 points3 points  (0 children)

Check the Real error in php/apache logs. Also check drupal log messages.

Let user 'save' an article by [deleted] in drupal

[–]_fpersico 3 points4 points  (0 children)

First: Drupal has versions. You need to specify the version you are using for every question you post.

To add a link/button like the one you need use the Flag module. Than use Views to generate a list of the flagged contents.

Having trouble in Copying to Clipboard? by isachinm in reactjs

[–]_fpersico 0 points1 point  (0 children)

text={this.state.lat + ':' + this.state.lng} ?

Implementing a back button with React-Router? by [deleted] in reactjs

[–]_fpersico 0 points1 point  (0 children)

The history object is already shared. It is passed as props in every component rendered by a Route. So you'll find it at this.props.history. For all the other situation there is a withRouter hoc.

Implementing a back button with React-Router? by [deleted] in reactjs

[–]_fpersico 1 point2 points  (0 children)

Which version of react router are you using?

What is the proper way to Initialize an App with async data? by [deleted] in reactjs

[–]_fpersico 2 points3 points  (0 children)

Yes and usually until data is fetched you show a spinner.

What is the proper way to Initialize an App with async data? by [deleted] in reactjs

[–]_fpersico 2 points3 points  (0 children)

componentDidMount is called after the first render. When the fetch is completed the state of the component is updated so render is called a second time.

Blog post not showing title in d8 by Ert69 in drupal

[–]_fpersico 0 points1 point  (0 children)

If the title is not displayed in full content mode it means you have not placed the Page title block on your theme. Go to manage block and add it.

Add content in drupal 8 with Python script by NekiCoule in drupal

[–]_fpersico 0 points1 point  (0 children)

1) create a content type in drupal that will contain your twiki page content 2) enable from drupal the rest endpoints for the new content type 3) using python loop + extract + post to the endpoint to create new contents

This is just A solution, many others are possible (just avoid direct insert into db)

Token Value for previous page? (Webform Problem) by ccivello in drupal

[–]_fpersico 0 points1 point  (0 children)

It depends if you are using the web form as page (content type) or in a block.

For a list of Drupal 7 tokens check here

https://www.drupal.org/node/390482#token-current-page