title: How to use animejs inside React?
body: <p>I have installed animejs from npm , and imported the required file, but when adding anime(code) inside my code it does not work prefectly and shows an error .</p>
  
  <p>this is a small example of what I did : </p>
  
  <pre><code>import React from 'react';
  import anime from 'animejs';
  
  
   const test =()=&gt;{
  
  
  const animation = anime({
      targets: '.css-selector-demo .el',
      translateX: 250
    });
  
  return(
      &lt;div&gt;
     {
     animation
     }
      &lt;/div&gt;
  )
  
  }
  export default test;
  
  </code></pre>
  
  <p>and this is the error that I got : </p>
  
  <pre><code>Error: Objects are not valid as a React child (found: object with keys {update,
  
  begin, loopBegin, changeBegin, change, changeComplete, loopComplete, complete, loop, 
  direction, autoplay, timelineOffset, id, children, animatables, animations, 
  duration, delay, endDelay, finished, reset, set, tick, seek, pause, play, 
  reverse, restart, passThrough, currentTime, progress, paused, began, loopBegan,
   changeBegan, completed, changeCompleted, reversePlayback, reversed, remaining}).
   If you meant to render a collection of children, use an array instead.
  
  </code></pre>